GNU bug report logs - #18798
ls -Rd = ls -d so maybe warn

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 22 Oct 2014 17:24:01 UTC

Severity: normal

Tags: moreinfo

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 18798 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 18798 <at> debbugs.gnu.org
Subject: Re: bug#18798: ls -Rd = ls -d so maybe warn
Date: Thu, 23 Oct 2014 12:02:28 -0600
積丹尼 Dan Jacobson wrote:
> I was thinking maybe ls -Rd would be like ls -R, but only show
> directories, not also regular files too.

There is always grep for simple things.

  ls -l | grep ^d

Once you start wanting to filter the listing by the type of object
then you really should start to use 'find' since 'find' is *the*
program designed for doing exactly that task.

  find . -type d

> I don't think any behavior should be changed. I just think some note
> about that combination should be added to the docs.

The --help output says:

  -d, --directory            list directories themselves, not their contents

The documentation currently says:

  ‘-d’
  ‘--directory’
     List just the names of directories, as with other types of files,
     rather than listing their contents.  Do not follow symbolic links
     listed on the command line unless the ‘--dereference-command-line’
     (‘-H’), ‘--dereference’ (‘-L’), or
     ‘--dereference-command-line-symlink-to-dir’ options are specified.

What would you say there instead of or in addition to the above?

Bob




This bug report was last modified 6 years and 221 days ago.

Previous Next


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