ls -z option

Richard Neill <[email protected]>
Newsgroups gmane.comp.gnu.fileutils.bugs
Organization Trinity College
Message-ID <[email protected]>
Dear all,

I'd really like to see a  -z option in ls. This would be for
"display the true siZe of directories".
ie when doing ls -l, I would like it to report the total size 
(recursively) of files inside a directory.

I have written a hack which does that. It's not very elegant, but it 
works OK, and hopefully it will demonstrate what I mean.

The files are both shell scripts, 'lsz' and 'lszZ'.
They can be got from here:

http://www.baddiant.org.uk/lsz
http://www.baddiant.org.uk/lszZ

1) chmod them executable
2) edit line 11 of 'lsz' to reflect the path of 'lszZ'
3) run lsz instead of ls. It supports options -lShraA


Best wishes

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.