ls -G is not "just like -l"

Bug #51653 reported by Martin Pool
6
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: coreutils

The ls manpage says

       -g like -l, but do not list owner

       -G, --no-group
              like -l, but do not list group

"ls -g" gives a long listing with the group shown, and not the owner, as advertised. However, "ls -G" gives just a short listing (with neither the owner or group shown). You need "ls -lG" to see the owner.

I suggest that -G should be changed to imply a long listing, as -g does -- that seems to be the designed and sensible behaviour, since otherwise the option is pointless. Otherwise at least the manpage should be fixed.

Revision history for this message
frogzoo (frogzoo) wrote :

This is a doc bug, if at all, try

'ls -lgG'

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 51653] Re: ls -G is not "just like -l"

On 3 Jul 2006, frogzoo <email address hidden> wrote:
> This is a doc bug, if at all, try
>
> 'ls -lgG'

It's certainly at least a doc bug. But I think it's more than that.
Can you justify 'ls -G' behaving as it does?

--
Martin

Revision history for this message
William Grant (wgrant) wrote :

If -g implies -l, then presumably -G should too. It a rather confusing behaviour.

Changed in coreutils:
status: Unconfirmed → Confirmed
Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 51653] ls -G is not "just like -l"

This is merely a documentation bug - the ls infopage is more accurate on
this subject.

`-g'
     Produce long format directory listings, but don't display owner
     information.

`-G'
`--no-group'
     Inhibit display of group information in a long format directory
     listing. (This is the default in some non-GNU versions of `ls',
     so we provide this option for compatibility.)

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 51653] Re: [Bug 51653] ls -G is not "just like -l"

Please, leave aside the inconsistency in the documentation, and just
tell me why the current behaviour of -G is useful. Why shouldn't it
imply -l?

--
Martin

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 51653] Re: [Bug 51653] Re: [Bug 51653] ls -G is not "just like -l"

I'd say it should, but I think it's more important not to change the
behaviour of such a core tool.

Changed in coreutils:
importance: Undecided → Low
Revision history for this message
Martin Pool (mbp) wrote :

The thing I was originally looking for, a long list without groups, is available from -o, which used to have the same documentation string as -G.

It looks like this has now been fixed (upstream?):

       -g like -l, but do not list owner
       -G, --no-group
              in a long listing, don’t print group names
       -o like -l, but do not list group information

Revision history for this message
Martin Pool (mbp) wrote :

docs are ok in hardy.

Changed in coreutils:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.