PDA

View Full Version : Hard linking to folders




mattrobs
Feb 5, 2009, 12:20 AM
John Siracusa mentions (http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars/14) that Time Machine does what it does because Leopard now allows hard linking to folders.

How do I do that? I've tried the ln command with no options, but I get source Is a directory error.

Help?



gnasher729
Feb 5, 2009, 03:46 AM
John Siracusa mentions (http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars/14) that Time Machine does what it does because Leopard now allows hard linking to folders.

How do I do that?

You don't. Time Machine can do it because it does things under very controlled circumstances, and you can only create hard links on your backup drive by using Time Machine. The OS doesn't allow you to create hard links to directories in any other way.

Being able to create hard links to directories would make it possible to create cycles between directories, causing all kinds of problems, possible or even likely creashes etc. imagine what happens if folder A is a hard link to folder B, and folder B is a hard link to folder A, and the Finder tries to display the contents of folder A.

kylos
Feb 7, 2009, 05:00 PM
I've been curious, I've been told to be ever so careful when dealing with hard links and multiple volumes. If I were to attempt to make a manual archive of Backups.backupdb on another volume using Finder, would I run into problems or will Finder properly handle the hard links when copying the files to a new volume?

gnasher729
Feb 7, 2009, 07:11 PM
I've been curious, I've been told to be ever so careful when dealing with hard links and multiple volumes. If I were to attempt to make a manual archive of Backups.backupdb on another volume using Finder, would I run into problems or will Finder properly handle the hard links when copying the files to a new volume?

The Finder wouldn't know the hard links are hard links. Every hour Time Machine creates what looks like a complete backup of your hard drive, but because of hard links, very little data is actually copied. If you copy any single one of those backups using the Finder, the result will be one complete set of data. Copy Backups.backupdb, and you end up with dozens of different copies of your hard drive, taken at different times.