From the book The Linux Command Line by William Shotts, page 33:
So now we have four instances of the file fun. Let's take a look at our playground directory.
[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
Total 16? I can’t see 16 files
Could you explain what this description means exactly:
drwxrwxr-x 2 me me 4096 2018-01-14 16:17 dir1
What does this letters means: drwxrwxr-x 2 me me 4096
?
Why “me me”?
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.
Why he’s calling second fields?
Contain a 4?? I’m only seeing one file:
-rw-r--r-- 4 me me 1650 2018-01-10 16:33 fun
drwxrwxr-x
the beginningd
means that this line refers to a directory: in fact,dir1
anddir2
are directories. The firstme
is the username of the author in his Linux system; the secondme
is his group. The "fields" are groups of characters, separated by spaces:-rw-r--r--
is the first field,4
is the second field,me
is the third field and so on. Please, search Google for the output of thels
command: try this. – BowPark Sep 19 '23 at 22:08ls -1
won't have given you that output. I think you intendedls -l
. Did you copy this from the book, or are you actually trying the examples on your own machine? You really need to be able to follow along and try stuff out yourself – Chris Davies Sep 19 '23 at 22:40