Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    ln link command and practical use

    hi guys,

    i understand the link command or ln can create hard links (though not to directories) and there are also symbolic links.

    but i dont understand the practicallity of this...when would you use a link, why would you...please help


  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    Here are a couple of real examples.

    Symbolic links:
    I have a bash script which is used by one of my conky scripts to get the alliteritive name of the kernel from the mskefile in the Linux source tree. Currently that is on my machine "linux-headers-3.7-5.towo.1-siduction-amd64". It would be a pain to update my script every time the kernel updates (and on Siduction it happens a lot!) so I use a symbolic link called linux which I update instead.

    Hard Links
    I use a piece of software called back-in-time to dump my data to an external drive every hour. Even with a 1.5TB drive it wouldn't take long to fill up and the drive would be constantly busy if it always copied everything. Instead what it does it copy everything the first time and then only actually copy files that are new or changed. It uses hard links to replicate the structure from the previous backup for files that haven't changed and still exist.
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts