start page | rating of books | rating of authors | reviews | copyrights

Unix Power ToolsUnix Power ToolsSearch this book

15.4. Save Space with a Link

You might have copies of the same file in several directories for the following reasons:

Instead of running cp, think about ln. There are lots of advantages to links (Section 10.3). One big advantage of hard links is that they don't use any disk space.[46] The bigger the file, the more space you save with a link. A symbolic link always takes some disk space, so a hard link might be better for ekeing the most space out of your disk. Of course, you have to use a symbolic link if you want to link across filesystems, and symbolic links are much more obvious to other people, so a symlink is less likely to confuse people. Generally the clarity is worth the little bit of extra disk space.

[46]The link entry takes a few characters in the directory where you make the link. Unless this makes the directory occupy another disk block, the space available on the disk doesn't change.

-- JP



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.