Linking Files: Hard Link vs. Soft Link?
Robert Parker
rlp1938 at gmail.com
Tue Apr 14 07:12:12 UTC 2009
On Tue, Apr 14, 2009 at 1:24 PM, Amichai Rotman <amichai at iglu.org.il> wrote:
> Hello,
>
> I have an alphabetized file hierarchy I'd like to organize into categories.
> These are all my media files - documents, video, audio etc.
>
> I created another hierarchy containing the categories I want and linked the
> files from the main hierarchy to the relevant category, using a soft link
> (ln -s).
>
> I realized it's a waste of space (two inodes for each file), so I thought
> re-creating the links as hard links.
4048 bytes and you can't afford that?
>
> My dilemmas:
>
> Is it really better? - I understand that if I hard link a file, it is
> actually the same file, and if I delete the so called link I actually delete
> the real file - might be dangerous... I know I am stating the obvious, but
> I'd like your input on this (pros and cons).
When you delete a file, what you do is remove the link to it. So with
multiple links the file is not finally removed until the last last
link to it is destroyed.
Bob Parker
--
In a world without walls who needs Windows (or Gates)? Try Linux instead!
More information about the ubuntu-users
mailing list