You can do 'ls -l
' to get a detailed directory listing like this:
-rw-rw-rw- 1 alice themonkeys 1159995999 2008-08-20 07:01 foo.log
-rw-rw-rw- 1 bob bob 244251992 2008-08-20 05:30 bar.txt
But notice how you have to slide your finger along the screen to figure out the order of magnitude of those file sizes.
What's a good way to add commas to the file sizes in the directory listing, like this:
-rw-rw-rw- 1 alice themonkeys 1,159,995,999 2008-08-20 07:01 foo.log
-rw-rw-rw- 1 bob bob 244,251,992 2008-08-20 05:30 bar.txt
I just discovered that it's built-in to GNU Core Utils and works for ls and du!
ls -l --block-size="'1"
du --block-size="'1"
It works on Ubuntu but sadly doesn't on OSX. More on variants of block size here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With