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

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