Joe Maller.com

Damn, it happened again. All my Stickies are gone. The Powerbook needed to be force-restarted (finicky projector hosed the display) and when it came back, the Stickies file was overwritten with the defaults. This happened once before after some other hardware related force-restart.

Stickies stores its data in a hidden database file in each user’s Library folder. The path to the file is:

/Users/ Your user folder name /Library/.StickiesDatabase

View the contents by typing pico .StickiesDatabase from the Users/username/Library directory

I was thinking about creating an application to back up the original file at regular intervals, but then I had a different idea.

I moved the .StickiesDatabase file to a different location with the mv command, then made a symlink named “.StickiesDatabase” (symlink is the unix name for an alias) and pointed it at the moved file. Stickies seems to work fine and followed the link to the moved file. Now if Stickies crashes and overwrites the file, will it overwrite the alias or the original?

The commands I used were:

mv .StickiesDatabase newstickiesbackup
which moved the original file, and

ln -s newstickiesbackup .StickiesDatabase
which created the symlink.

It’s probably a good idea to back up the file anyway, but I’m going to give this a try. Maybe I’ll even force a few restarts later.

Share |
link: Jul 31, 2002 7:52 pm
posted in: misc.

Comments are closed.