bkouhi said:I guess this is in KB because of this line in your ~/.cshrc
Code:setenv BLOCKSIZE K
Change it to M to get the size in Megabytes or G for Gigabytes.
Please seeman environ | less -p BLOCKSIZE
for more information.
jronald said:It is a little complex, if a unit is added in the result, it is completed by itself.
Uniballer said:I like it, too. But wouldn't it be nice if sort had a -h switch to accept that output format for sorting input? E.g.du -hcs * | sort -h
fluca1978 said:That's why there is a -h option to several commands that use BLOCKSIZE. The idea of having commands outputting numbers is useful when you have to elaborate such results in scripts and do not have to deal with alpha-numerical strings.