Re: ls and root directory indicator (original) (raw)


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


From: Eric Blake
Subject: Re: ls and root directory indicator
Date: Mon, 25 Feb 2013 06:27:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

On 02/24/2013 11:09 AM, Pádraig Brady wrote:

On 02/24/2013 05:39 PM, Sami Kerola wrote: > Hello, > > When using file type indicator to a root, e.g., > > $ ls -Fd / > // > > two slashes are printed. To me that feels wrong. Patch below is an > attempt to make root print out to be a single slash. Perhaps there is > more elegant way to do the same. Or maybe I am mistaking, and double > slash is correct, although I could not find earlier posting about > that.

I agree it looks a bit awkward, but I think it's more consistent to keep the trailing /. Consider a script that filters on and strips a trailing /

I kind of like the idea of omitting the trailing slash for roots (note the plural); since '/' and '//' are not necessarily the same root, and listing '//' for '/' or '///' for '//' is confusing. However, since the proposed patch does not special case '//', it is not an appropriate patch in its current form.

-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature