[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6186: du in coreutils should add the -d flag as a shortcut to --max-
bug#6186: du in coreutils should add the -d flag as a shortcut to --max-depth
Thu, 13 May 2010 16:23:26 -0700
So here is my first whack at it. One thing to note is there was a DU_DEBUG
optional define that defined a -d flag to use for debugging. It seemed like
using -d would be more useful for everyone to use for depth then for debug so I
modified the slightly oddly thrown in debug stuff to now work with --debug
instead. Though when I actually define DU_DEBUG so the #if DU_DEBUG is picked
up and used it complains about the function missing so I'm kind of curios if
this has worked for awhile.
Anyways any feedback or recommendations would be greatly appreciated so this
has a better chance of making its way into the release.
Thank you for your time on this matter!
On May 13, 2010, at 12:31 PM, Eric Blake wrote:
> On 05/13/2010 01:19 PM, Jon Ringuette wrote:
>> For example currently to say get the size of all the home directories
>> of users one would use : du /home -h --max-depth=1 . It would make
>> life simpler and make going from FreeBSD systems to Linux systems
>> easier for people and scripts if the syntax : du /home -h -d 1 was
>> also supposed.
> Prior practice is always a good reason to support changes like this. It
> would be a very simple patch to du.c to convert --max-depth from
> long-option only to also having a short-option equivalent. Would you
> like to try your hand at it first?
> If not, I can probably get around to this in another day or two.
> Eric Blake address@hidden +1-801-349-2682
> Libvirt virtualization library http://libvirt.org