ln - make symbolic links
A symbolic link is a "file" pointing to another file.To make a symbolic link :
ln /original/file /new/linkThis makes /original/file and /new/link the same file - edit one and the other will change. The file will not be gone until both /original/file and /new/link are deleted.
You can only do this with files. For folders, you must make a "soft" link.
To make a soft symbolic link :
ln -s /original/file /new/linkExample:
ln -s /usr/src/linux-2.4.20 /usr/src/linuxNote that -s makes an "empty" file pointing to the original file/folder. So if you delete the folder a symlink points to, you will be stuck with a dead symlink (just rm it).
No comments:
Post a Comment