second field of "ls -l" output of directory
Hya,
I regret to post this kind of newbie question. I am totally lost. Code:
>ls -l first field for file is permission second field for file is "count of hardlink" third field is owner fourth is group fifth is size sixth (through eithth) is time stamp ninth is name. What is second field when target is directory? The other fields are not difficult. man page and info coreutils ls do not give us much. Happy Penguins! |
Just guessing---since directories are just a type of file, I would assume that that field has the same meaning. I can't seem to psyche out why some directories have different numbers.
One interesting thing; On my system no directory shows less than 2 in that field. |
According to the Linux Cookbook the second field for a directory lists the number of hard links to the file, which is the same as "count of hardlink". It doesn't seem to be different for a directory than for a single file. Hope this helps.
|
Hya,
Thanks for replies. However, Quote:
Happy Penguins! |
"." and ".." also count has hard links, so you are never going to have less than 2 hard links to any directory. If you create a subdirectory you will find that the count goes up to 3 (because your subdir contains a "..")
|
All times are GMT -5. The time now is 06:47 PM. |