GNU bug report logs -
#9504
ls oddity
Previous Next
Reported by: Dave Pawson <dave.pawson <at> gmail.com>
Date: Wed, 14 Sep 2011 12:04:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 9504-done <at> debbugs.gnu.org (full text, mbox):
tag 9504 notabug
thanks
On 09/14/2011 05:58 AM, Dave Pawson wrote:
> ls -al works as expected
>
> ls *.xml ... fails?
>
> [dpawson <at> localhost pawson]$ ls *.xml
> ls: invalid option -- ':'
> Try `ls --help' for more information.
>
>
> Not sure if it's a bug or my setup?
The only bug here is in your command line arguments. This is a FAQ:
https://www.gnu.org/software/coreutils/faq/#I-have-a-file-_0027_002df_0027-and-it-affects-rm_002e
Try:
echo ls *.xml
to see what the glob expanded to; my guess is that you have a file named
"-:.xml" or something similar, which ls is then trying to interpret as
an option.
To avoid the problem, use either:
ls -- *.xml
ls ./*.xml
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
This bug report was last modified 13 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.