Subject: bug#6186: closed (Re: bug#6186: du in coreutils should add the -d flag as a shortcut to --max-depth)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 19 May 2010 07:18:02 +0000

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 [email-masked].

-- 
6186: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6186
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#6186: du in coreutils should add the -d flag as a shortcut to --max-depth
From: Jim Meyering <[email-masked]>
To: Jon Ringuette <[email-masked]>
Cc: [email-masked], Eric Blake <[email-masked]>
Date: Wed, 19 May 2010 09:17:25 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Jim Meyering wrote:
...
>>>From a1b74559f1b0dc60b866fa9c0220096fa4abffeb Mon Sep 17 00:00:00 2001
> From: Jim Meyering <[email-masked]>
> 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 <[email-masked]>
> 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.

Subject: du in coreutils should add the -d flag as a shortcut to --max-depth
From: Jon Ringuette <[email-masked]>
To: [email-masked]
Date: Thu, 13 May 2010 11:47:22 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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: [email-masked]

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.