Explaining Soft Link And Hard Link In Linux With Examples

8 Responses

  1. Kanika says:

    Very clearly explained.

  2. Mike says:

    Great explanation!!! Thanks

  3. chindesh says:

    Simple and clean. Thank you!

  4. Mohammed Firdosh Nasim says:

    Nice explanation. Requesting you to update the following “file permissions (lrwxrwxrwx vs lrwxrwxrwx)” in soft link section to in “file permissions (lrwxrwxrwx vs -rw-r–r–)” .

  5. Excellent explanation! Just a thought: a “mirror copy” implies that both source.file and hardlink.file use different disk space, thus occupping twice as much space (“a copy”), which is wrong.

    Both file names are just different entries in the directory listing to the same “data”, same disk space (identified by an inode), and Linux have a “link count” of file names in every inode. It only erases the inode data when the link count reaches zero.


  6. Sandeep says:

    Great explanation, just one questions, can you please explain that why do we need to create Soft Link or Hard Link, what is the purpose of creating these links. Can you please let me know one scenario for this? Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.