ln

ln - link a files and directories

Create symbolic link "B" that points to real file "A" Be careful.

ln -s   a       b
        ^       ^
       must    destroyed
       exist   if exists
user@example.com [~/test]% ln -s ln.txt ln-notes.txt
user@example.com [~/test]% ln ln.txt ln-notes2.txt
user@example.com [~/test]% mkdir DIR 
user@example.com [~/test]% ln DIR symlinkdir    <-- Can make hard links for files, but not  directories
ln: `DIR': hard link not allowed for directory
user@example.com [~/test]% ln -s DIR symlinkdir
user@example.com [~/test]% ls -al
total 20
drwxr-xr-x  3 gregg gregg 4096 Jan 11 00:13 ./
drwx--x--x 27 gregg gregg 4096 Jan 11 00:12 ../
drwxr-xr-x  2 gregg gregg 4096 Jan 11 00:13 DIR/
lrwxrwxrwx  1 gregg gregg    6 Jan 11 00:13 ln-notes.txt -> ln.txt*
-rwxr-xr-x  1 gregg gregg  146 Jan 11 00:12 ln.txt*
lrwxrwxrwx  1 gregg gregg    3 Jan 11 00:13 symlinkdir -> DIR/