Using ls
When using ls -l, what is the total that is given at the top? It doesn't appear to correspond with the number of files I see.
What option can you use to display the number of files in a directory? |
Take a look at man ls.
|
Okay, I read that but still don't know what the total below means. Man page also doess not state which option will report total files.
ls -l total 96 drwx------ 4 ekridaka students 4096 Jul 6 01:56 . drwxr-xr-x 24 root root 4096 Jun 30 17:14 .. |
That value is actually explained in
info coreutils ls But the OP could have found that themselves if they had been curious enough and read the entire man- page themselves, and followed the advice in the SEE ALSO section of man. In brief, the total gives the total number of BLOCKS used by the directory. Cheers, Tink |
A neat trick that ls does is columnarise output if it's going to a terminal, otherwise it prints one filename per line. The -1 flag replicates this behaviour to a terminal. To replicate the terminal behaviour to a non-terminal device, use -C.
|
All times are GMT -5. The time now is 09:29 AM. |