bug-coreutils
[Top][All Lists]
Advanced

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

bug#18798: ls -Rd = ls -d so maybe warn


From: Bob Proulx
Subject: bug#18798: ls -Rd = ls -d so maybe warn
Date: Thu, 23 Oct 2014 12:02:28 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

積丹尼 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





reply via email to

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