[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dir command



William Pursell:
> 
> To get sizes, du is the obvious choice, but you
> could do the ridiculous:
> $ find . -type f -exec cat {} \; | wc -c

Note that this is different from du in that it counts characters, not
bytes. In some encodings a character may be larger than one byte, so
your result would be a little off. And I don't think wc can count
'characters' in binary files at all.

Additionally, du doesn't count files' sizes, but the size that they take
on disk (multiples of the file system's block size).

J.
-- 
If all my friends had Playstations I would buy a Nintendo to prove my
individuality.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: