symlink confusion

Steve Bertrand iaccounts at northnetworks.ca
Wed Nov 12 11:55:11 PST 2003


Could someone please briefly describe the reactions to the following
actions? Sometimes I delete the original directories by deleting links,
and hopefully someone can give me some insight.

# ln -s /home/steve/directory /tmp/directory
# rm /tmp/directory

In testing, the original directory (/home/steve/directory) did not get
removed, but in reality, I am dealing with my X11R6 directory which had to
be moved temporarily to make room for a port install.

# ln -s /usr/X11R6 /home/steve/X11R6

Which put a new link from the original to the new location.

If I # rm /home/steve/X11R6, will I be safe as to not delete the original
directory?

If this is true, what could I have done in the past that would of seen an
entire directory structure deleted by deleting the link?

Tks for your input.

Steve


More information about the freebsd-questions mailing list