[Top][All Lists]

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

Re: Feature Request: du --dir-with-slash

From: Pádraig Brady
Subject: Re: Feature Request: du --dir-with-slash
Date: Fri, 7 Mar 2008 17:01:04 +0000
User-agent: Thunderbird (X11/20071008)

Eric Blake wrote:
> I don't think you can do it by default - it must be via an option.  POSIX
> states:
> ~    The output from du shall consist of the amount of space allocated to a
> file and the name of the file, in the following format:
> ~    "%d %s\n", <size>, <pathname>
> http://www.opengroup.org/onlinepubs/009695399/utilities/du.html
> (where ' ' implies an arbitrary amount of whitespace characters).
> I don't think we can arbitrarily add / to <pathname> and still comply with

So does that mean we should be stripping trailing /
from directories that are specified?

$ du -s /tmp////
8040    /tmp////

I think adding a / to all dirs is therefore more consistent
as well as providing more info to the user.
I understand the need to comply with POSIX where possible,
but one needs to use common sense to move forward.
POSIX is not the be all and end all.


reply via email to

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