GNU bug report logs - #6175
dirname manpage and info page partially wrong/misleading

Previous Next

Package: coreutils;

Reported by: Filipus Klutiero <chealer <at> gmail.com>

Date: Tue, 11 May 2010 21:30:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


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

From: Filipus Klutiero <chealer <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: dirname manpage and info page partially wrong/misleading
Date: Tue, 11 May 2010 17:17:22 -0400
This report is about 2 separate issues in the dirname documentation. The 
info page is much better than the manual page, but says:
> `dirname' prints all but the final slash-delimited component of a
> string (presumably a file name, but also works on directories).
The parenthese is wrong; there is no reason to presume the file given is 
a regular file, dirname is equally useful on directories. "presumably" 
should perhaps be replaced by "usually", or removed.

The manual page is much more confusing, saying:

> DESCRIPTION
>
>
>  Print NAME with its trailing /component removed; if NAME contains no 
> /'s, output `.' (meaning the current directory).

dirname is more complex than just removing a trailing slash followed by 
a pathname component if that is the ending. For example, it also removes 
a slash followed by a pathname component followed by a slash, if that is 
how the path terminates. The manual should probably adopt the info 
page's formulation, which is more vague, but not wrong.





This bug report was last modified 14 years and 42 days ago.

Previous Next


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