[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11228: Bug in ls?
From: |
Eric Blake |
Subject: |
bug#11228: Bug in ls? |
Date: |
Wed, 11 Apr 2012 20:49:41 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
tag 11228 notabug
thanks
On 04/11/2012 06:13 PM, dfm wrote:
> Hi!
> I noticed that
> ls -a *old
> won't match .xsession.old.
> I don't know if it a bug or a feature. ;)
Feature. In fact, ls isn't even involved - glob expansion is done by
the shell before ls even gets to see argv.
> To list it I must type ls -a | grep .old
> or ls .*old
Indeed - POSIX requires that file names beginning with '.' do not match
a glob starting with '*'; if you want to list such files, you have to
explicitly match the leading dot.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature