The Linux Command Line
William Shotts
Page 33
[me@linuxbox playground] $ ls -1
total 16
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir1
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir2
-rw-r—r— 4 me me 1650 2018-01-10 16:33 fun
-rw-r—r— 4 me me 1650 2018-01-10 16:33 fun-hard
One thing we notice is that both the second fields in the listings for fun and fun-hard contain a 4, which is the number of hard links that now exist for the file. Remember that a file will always have at least one link because the file's name is created by a link.
Please explain this better:
fun and fun-hard contain 4 hard links?dir1 and dir2 contain 2 hard links?
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir1
How can this data file contain 2 hard links ?
Remember that a file will always have at least one link because the file's name is created by a link.
I can’t understand this