Re:Hacking ls -l
by pepve on Saturday October 13, 2012 @06:12PM
(#4649904)
I guess people can be very different in this respect. I really need the full number (or at least all of the numbers in the same unit) to be displayed. I don't find the 'human' format helpful at all when looking at ls output.
[ Parent
| on HN ]
Re:Hacking ls -l
by sliverstorm on Saturday October 13, 2012 @10:33PM
(#4650410)
It just depends what info you desire. I typically use "ls -lh" to quickly find large files to clean up to recover disk space.
I use "du <directory> -h -d 1|sort -h" for this because large files may be nested in directories and ls doesn't display the size of content directories (as far as I know). The output is sorted. Note that the "-d" flag for "du" doesn't work with all versions, but there were similar flags on all systems.
Re:Hacking ls -l
by sliverstorm on Monday October 15, 2012 @01:39AM
(#4653923)
I don't usually have access to a version of "sort" that supports the "-h" flag.