Save Space with a Link (Unix Power Tools, 3rd Edition)
15.4. Save Space with a Link
You might have copies of the same file
in several directories for the following reasons:
Several different users need to read it (a data file, a program setup
file, a telephone list, etc.).
It's a program that more than one person wants to
use. For some reason, you don't want to keep one
central copy and put its directory in your search path (Section 27.6).
The file has a strange name or it's in a directory
you don't usually use. You want a name
that's easier to type, but you
can't use mv.
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
15.3. Save Space with "Bit Bucket" Log Files and Mailboxes15.5. Limiting File Sizes
Copyright © 2003 O'Reilly & Associates. All rights reserved.
Wyszukiwarka
Podobne podstrony:
ch15 (7)ch15ch15ch15CH15 (2)ch15ch15CH15 (18)ch15 (28)ch15ch15 (10)ch15ch15ch15ch15ch15 (3)ch15więcej podobnych podstron