[oclug] Linking Directories. - An answer.
Andrew Hutton
ajh at finux.org
Thu Jan 11 02:10:14 EST 2001
At the end of the last meeting someone was asking about why we couldn't
hardlink a directory in Linux. Bind mounts are a way to accomplish this
on Linux.
mount --bind /usr/$SYS/lib /usr/lib
For those of you who don't know, the ln command makes another directory entry
for a given file, making it seem to exist in more than one directory at the
same time. The file is only removed when the last link to it is removed.
ln -s creates what we call a symbolic link or a file that contains the name
and location of another file. They are useful when the file you're linking
to is not on the same disk or you need to know that it is a link. A directory
listing for a symlink looks like.
[ajh at fdisk ajh]$ ln -s zks.ps new.ps
[ajh at fdisk ajh]$ ls -l new.ps
lrwxrwxrwx 1 ajh ajh 6 Jan 11 02:09 new.ps -> zks.ps
man ln for more information.
--
Andrew J. Hutton,
Ottawa Linux Symposium, International Linux Developers Conference
http://www.linuxsymposium.org/ July 25th-28th, 2001
More information about the OCLUG
mailing list