read Read read Read - 2 years ago 82
Bash Question

how to create a link to a directory

How to create a link xxx to /home/jake/doc/test/2000/something/?

Assume the xxx is created under /home/jake and you currently under /home/jake. When you do "cd xxx", you directly go to /home/jake/doc/test/2000/something/.

Answer Source

Symbolic or soft link (files or directories, more flexible and self documenting)

#     Source                             Link
ln -s /home/jake/doc/test/2000/something /home/jake/xxx

Hard link (files only, less flexible and not self documenting)

#   Source                             Link
ln /home/jake/doc/test/2000/something /home/jake/xxx

More information: man ln

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download