GNU bug report logs - #21218
ls -d

Previous Next

Package: coreutils;

Reported by: "Sneeh, Eddie" <eddie.sneeh <at> roche.com>

Date: Sat, 8 Aug 2015 00:14:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Rainer M. Canavan" <coreutils <at> canavan.de>
To: 21218 <at> debbugs.gnu.org
Subject: bug#21218: ls -d
Date: Sat, 8 Aug 2015 12:59:50 +0200 (CEST)
Eric Blake <eblake <at> redhat.com> wrote:

[...]

> All -d does is to list command line arguments that are directories as
> the name of the directory itself, rather than descending and showing the
> directory's contents.

That description is already better than the current one in the
man page, which reads:

       -d, --directory
              list directory entries instead of contents, and do not  derefer-
              ence symbolic links

I'd say that one can reasonably be understood to mean that files would
not be listed, as Eddie did. I'd suggest a new wording:

       -d, --directory
              If an argument is a directory, list the directory itself 
              instead of its contents. Frequently used with -l to display
              the properties of directories.

I don't see any relevant effect on symbolic links, so unless soeone can
come up with an explanation, maybe that part can be dropped.

$ ls -ld b   
lrwxr-xr-x 1 canavan user 1 Aug  8 12:45 b -> a
$ ls -l b
lrwxr-xr-x 1 canavan user 1 Aug  8 12:45 b -> a
$ ls -d b
b
$ ls  b
b

rainer




This bug report was last modified 9 years and 289 days ago.

Previous Next


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