Can any one explain "-rw-rw-r--. 1 " and give some "detailed" information on ls -lart command.
Why does the number change after "-rw-rw-r--. 1 " <----
|
Can any one explain "-rw-rw-r--. 1 " and give some "detailed" information on ls -lart command. Why does the number change after "-rw-rw-r--. 1 " <---- |
|||||||||||||||
|
|
Some examples:
So:
See chapter The Long Format of |
|||||
|
|
[max@localhost ~]$ ll total 4 drwxrwxr-x 2 max max 4096 Sep 25 17:11 zzz Here 2 means number of link count now I will create 3 directories inside zzz now value changes to 5 [max@localhost ~]$ cd zzz [max@localhost zzz]$ mkdir a b c drwxrwxr-x 5 max max 4096 Sep 25 17:16 . drwx------ 5 max max 4096 Sep 25 17:12 .. drwxrwxr-x 2 max max 4096 Sep 25 17:16 a drwxrwxr-x 2 max max 4096 Sep 25 17:16 b drwxrwxr-x 2 max max 4096 Sep 25 17:16 c [max@localhost zzz]$ cd [max@localhost ~]$ ll total 4 drwxrwxr-x 5 max max 4096 Sep 25 17:16 zzz That is because now 5 directories are present inside zzz 3 are if I create file then nothing will happen to link count [max@localhost zzz]$ touch 1 2 3 [max@localhost zzz]$ ls -al total 20 drwxrwxr-x 5 max max 4096 Sep 25 17:26 . ------> current directory link count drwx------ 5 max max 4096 Sep 25 17:12 .. ------> parent directory link count -rw-rw-r-- 1 max max 0 Sep 25 17:26 1 -rw-rw-r-- 1 max max 0 Sep 25 17:26 2 -rw-rw-r-- 1 max max 0 Sep 25 17:26 3 drwxrwxr-x 2 max max 4096 Sep 25 17:16 a drwxrwxr-x 2 max max 4096 Sep 25 17:16 b drwxrwxr-x 2 max max 4096 Sep 25 17:16 c [max@localhost zzz]$ cd [max@localhost ~]$ ll total 4 drwxrwxr-x 5 max max 4096 Sep 25 17:26 zzz but if I delete any directory then link count will change [max@localhost zzz]$ rmdir b c [max@localhost zzz]$ cd [max@localhost ~]$ ll total 4 drwxrwxr-x 3 max max 4096 Sep 25 17:28 zzz |
|||
|
|