Skip to main content
Commonmark migration
Source Link

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST
(source: freesoftwareservers.com)

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST
(source: freesoftwareservers.com)

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST
(source: freesoftwareservers.com)

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

broken image fixed (click 'rendered output' or 'side-by-side' to see the difference; image retrieved via Wayback Machine); for more info, see https://gist.github.com/Glorfindel83/9d954d34385d2ac2597bbe864466259f
Source Link

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POSTVIEW THIS IMAGE BEFORE READING POST
(source: freesoftwareservers.com)

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST
(source: freesoftwareservers.com)

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mountWhat is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

HARD LINK (Only Files) vs SOFT LINK (Files or Directories) vs BIND (HARD LINK for Directories)

VIEW THIS IMAGE BEFORE READING POST

While daxelrod's answer explains the question well, I thought that the picture in this case made a big difference, especially to beginners who don't understand inodes and complicated Linux jargon quite yet.

Think of this, if you "deleted" everything from your drive, you could run software to restore the data, because the 1's and 0's are still there, you just deleted all the Hard Links. Recovery Software's purpose is to rebuild the Hard Links to make sense of the 0's and 1's

I read a great "one liner" that made this all make sense and I wanted to share!

All files in Linux are "Hard Links" to the 0's and 1's on the disk. When you create a data (0's & 1's) the OS creates a Hard Link in the File Tree to reference that spot on the hard disk.

#Create HARD LINK 2 and delete HARD LINK 1 Original File:

You may create another hard link and delete the original file, and you still have access to the newly created hard link.

#Delete FILE(HARD LINK 1) that is SOFT LINKed to:

If you deleted the HARD LINK 1, do you think the SOFT LINK would work? No, The OS will report back that the HARD LINK 1 does not exist.

#Delete SOFT LINK to HARD LINK:

In reverse, if you delete the SOFT LINK, will either HARD LINK work? Yes. As long as the OS has one HARD LINK File it will report that the fill has not been deleted.

-- Also worth researching/noting is BIND, a way to BIND two directories like symlinking two directories, but it is transparent to the OS (OS's can tell when you Symlink and some have rules regarding weather they can follow Symlinks). It uses Mount, not LS and can be configured via FSTAB.

What is a BIND mount

removed BIND and added link to another post
Source Link
FreeSoftwareServers
  • 2.7k
  • 15
  • 41
  • 60
Loading
added 277 characters in body; deleted 15 characters in body
Source Link
FreeSoftwareServers
  • 2.7k
  • 15
  • 41
  • 60
Loading
added 217 characters in body
Source Link
FreeSoftwareServers
  • 2.7k
  • 15
  • 41
  • 60
Loading
removed comment about someone else answer
Source Link
FreeSoftwareServers
  • 2.7k
  • 15
  • 41
  • 60
Loading
Source Link
FreeSoftwareServers
  • 2.7k
  • 15
  • 41
  • 60
Loading