Skip to main content
Home Documents Software Guides Alias Tricks
Alias Tricks

Alias Tricks

Filenamealias-tricks.txt
Size0.01 MB
Downloads3
Contents
Date: Wed, 8 Jun 1994 13:52:38 +1000 From: "Michael.Smith" <Michael.Smith@maths.anu.edu.au> Subject: Tricks for keeping aliases connected Warning: I waffle on a bit in this message. This a brief account of my recent experiences with aliases. Hopefully it will be of use to others. A simple trick allowed me to do a backup-restore of my hard disk with only a few aliases ending up detached (some because I forgot to unlock them before starting, others because they ended up pointing across the new partitions). How do aliases work? -------------------- As far as I know, an alias encodes its destination in two ways. I won't go into too many details, since I have only educated guesses on precisely how it works, but experimentation can verify the following facts: (1) Stored within the alias is a "pointer" to the location of the target on the disk --- when a file is created it is assigned a unique pointer which remains unchanged as the file is moved around, renamed and modified. If the file is deleted, this pointer becomes invalid. If the pointer stored in the alias is valid then just follow the pointer to the target. (2) Also stored in the alias is the last known path to the file. For example the stored path might be "HD:Documents:targfile" which means that when the alias was last resolved it was to a file called "targfile" in folder "Documents" on hard drive "HD". So when the system attempts to resolve an alias it first checks whether step (1) gives the target, and only if that fails does it then check step (2). If both fail, the alias cannot be resolved. Bacause of step (1), you can create an alias to a file, and then move the file around, change the name of it and change the names of folders and drives that it is stored on. None of these operations changes the pointer to the file's information blocks. However, replacing a file by one with the same name does prevent step (1) from succeeding, but then step (2) comes to the rescue. Hassle free backup/restore -------------------------- What was I to do? I had a 330MB hard drive with a single partition named "Centris650", and I wished to back it up, reformat and partition it into 3 volumes, and then restore files into the 3 new partitions. First I ran an alias checking program, which searches disks for all aliases, and tries to resolve each of them (AliasBoss, AliasZoo and FileBuddy all do this for you). This ensured all my aliases on "Centris650" had both their components (pointer and path) updated. This was important since I may have moved some around a while ago without resolving them since, so their paths would be incorrect, and the whole trick it to rely on the path component of the alias. Then I backed up the disk into 2 different Stuffit archives, one for each of the intended volumes. After reformatting and partitioning the drive, I restored the files into the 3 new volumes named "part1", "part2", and "part3". But now every file was a new copy, and none of the pointers stored insid…

Showing first 3,000 characters of 6,289 total. Open the full document →