GNU bug report logs - #6186
du in coreutils should add the -d flag as a shortcut to --max-depth

Previous Next

Package: coreutils;

Reported by: Jon Ringuette <jonr <at> scharp.org>

Date: Thu, 13 May 2010 18:49:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jon Ringuette <jonr <at> scharp.org>
Subject: bug#6186: closed (Re: bug#6186: du in coreutils should add the -d
 flag as a shortcut to --max-depth)
Date: Wed, 19 May 2010 07:18:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6186: du in coreutils should add the -d flag as a shortcut to --max-depth

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6186 <at> debbugs.gnu.org.

-- 
6186: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6186
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Jon Ringuette <jonr <at> scharp.org>
Cc: 6186-done <at> debbugs.gnu.org, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#6186: du in coreutils should add the -d flag as a shortcut to
	--max-depth
Date: Wed, 19 May 2010 09:17:25 +0200
Jim Meyering wrote:
...
>>From a1b74559f1b0dc60b866fa9c0220096fa4abffeb Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering <at> redhat.com>
> Date: Tue, 18 May 2010 08:39:40 +0200
> Subject: [PATCH 1/2] tests: exercise du's --max-depth option
>
> * tests/Makefile.am (TESTS): Add du/max-depth.
> * tests/du/max-depth: New file.
...
>>From 1ccacf7a1b5b93f9e4c8ef562ceceab9726f8656 Mon Sep 17 00:00:00 2001
> From: Jon Ringuette <jonr <at> scharp.org>
> Date: Tue, 18 May 2010 08:26:11 +0200
> Subject: [PATCH 2/2] du: recognize -d N as equivalent to --max-depth=N
>
> * NEWS (New features): Mention it.
> * src/du.c (DEBUG_OPT): Remove.  Use long-named ---debug instead.
> Commented out.
> (MAX_DEPTH_OPTION): Remove.  Use 'd' instead.
> (main): Insert literal "d:"; remove DEBUG_OPT.
> * doc/coreutils.texi (du invocation): Add -d to indices.
> * tests/du/max-depth: Exercise -d, too.
> ---
>  NEWS               |    3 +++
>  doc/coreutils.texi |    2 ++
>  src/du.c           |   15 +++++++--------
>  tests/du/max-depth |    7 +++++++
>  4 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 5d7b81f..19436fe 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -4,6 +4,9 @@ GNU coreutils NEWS                                    -*- outline -*-
>
>  ** New features
>
> +  du recognizes -d N as equivalent to --max-depth=N, for compatibility
> +  with FreeBSD.

I've pushed those two change sets.

[Message part 3 (message/rfc822, inline)]
From: Jon Ringuette <jonr <at> scharp.org>
To: submit <at> debbugs.gnu.org
Subject: du in coreutils should add the -d flag as a shortcut to --max-depth
Date: Thu, 13 May 2010 11:47:22 -0700
[Message part 4 (text/plain, inline)]
Package : coreutils
Version : All
Command : du
Type : Feature Request

Hello,

In the FreeBSD world it is common to have a short argument of '-d' for --max-depth.   This greatly shortens a command one must type to when a depth argument is used (which from my experience is often).

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.

Thank you,

-- 
Jon Ringuette
SCHARP/FHCRC
1100 Fairview ave. N LE-400
Office: Phone: 206.667.6378  Mobile: 206.659.5660  Fax: 206.667.4812
E-mail: jonr <at> scharp.org

CONFIDENTIALITY NOTICE: This e-mail message and any attachments may be confidential and privileged. If you are not intended to receive this
message, please notify the sender and destroy the message. Thank you.

[Message part 5 (text/html, inline)]

This bug report was last modified 15 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.