bug-coreutils
[Top][All Lists]
Advanced

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

Re: Feature Request: du --dir-with-slash


From: Pádraig Brady
Subject: Re: Feature Request: du --dir-with-slash
Date: Mon, 10 Mar 2008 11:23:27 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Thomas Guettler wrote:
>>> I'm very dubious about adding this as an option.
>>> Do you really think an option is warranted for this,
>>> considering you can already get the desired behavior
>>> with a small wrapper, as I demonstrated:
>>>     
>> The wrapper is awkward, but it's better than a new option.
>>
>> So probably best to do nothing here as you suggest.
>>
>>   
> 
> I know that it easy to use the 'du -a' and pipe the output to a
> check if it is a directory. But if you have a lot of files, it
> really matters if you touch a files twice.
> 
> And this solution does not count the size of directories.
> 
> find / -xdev -printf "%k\t%p%y\n" |
> sed 's/d$/\//;t; s/.$//;' |
> LC_ALL=C sort -rn -k1,1

Oops true. How about (I realize this is getting protracted):

find / -xdev -printf "%p%y\n" |
sed 's/d$/\//;t; s/.$//;' |
tr '\n' '\0' |
xargs -r0 du -s |
LC_ALL=C sort -rn -k1,1

thanks,
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]