bug-coreutils
[Top][All Lists]
Advanced

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

bug#9504: ls oddity


From: Eric Blake
Subject: bug#9504: ls oddity
Date: Wed, 14 Sep 2011 08:03:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110831 Fedora/3.1.12-2.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.12

tag 9504 notabug
thanks

On 09/14/2011 05:58 AM, Dave Pawson wrote:
ls -al works as expected

ls *.xml ... fails?

address@hidden 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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org





reply via email to

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