3
votes
1answer
1k views

List a directory, including subdirectories, with file count and cumulative size

Is there a way to list out the content of a directory including subdirectories with a file count and cumulative size? I would like to see: Number of directories Number of sub directories number of ...
6
votes
1answer
225 views

why ls reports a huge file and du does not?

When I run arm-none-eabi-objcopy -O binary add.elf add.bin everything seems to be ok. But, later when I run ls -lh add.bin add.elf this is the output I received: -rw-r--r-- 1 david david 2,6G nov 23 ...
11
votes
2answers
1k views

“ls -lh” reports total size less than sum of individual sizes

Under what circumstances would ls -lh show a total that is less than the sum of the individual files? For example: $ ls -lh /var/lib/nova/instances/_base total 100G -rw-rw-r-- 1 nova nova ...
4
votes
2answers
4k views

How to list ALL directories according to their size? [without including the parent directory]

I have a bunch of random folders, some of them are hidden (beginning with a period). I want to list all of them, sorted by their sizes. I have something on the lines of this in mind: ls -d -1 -a */ ...