Man Page: http://unixhelp.ed.ac.uk/CGI/man-cgi?ln
ln ‘filename’
creates a hard link to that file name. Editing either the link or the target file will make changes to both. Should you delete the original file the hard link, and the contents of the original file remain
ln -s 'filename'
will create a soft link to a file. A soft link’s permissions are 777 and do not change. The permissions are actually stored with the original file. Any attempted changes to permissions for a soft link will affect the original file and any hard links to that file, but the soft link will remain at 777. If the orginal file is deleted, the soft link will remain but will show as a dead link (red) and will NOT contain the original files contents.
ln can also be used on directories.
Leave a Reply