emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#8513: closed (stat list file name)


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#8513: closed (stat list file name)
Date: Sun, 17 Apr 2011 05:52:03 +0000

Your message dated Sat, 16 Apr 2011 23:51:10 -0600
with message-id <address@hidden>
and subject line Re: bug#8513: stat list file name
has caused the GNU bug report #8513,
regarding stat list file name
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
8513: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8513
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: stat list file name Date: Sun, 17 Apr 2011 04:47:59 +0200 here a small bug in stat:

stat -c %n *
stat : option invalide -- 's'
Saisissez « stat --help » pour plus d'informations.

ls
address@hidden&.txt

stat is not able to list a direstory if a file start with a -

--- End Message ---
--- Begin Message --- Subject: Re: bug#8513: stat list file name Date: Sat, 16 Apr 2011 23:51:10 -0600 User-agent: Mutt/1.5.21 (2010-09-15)
- - wrote:
> here a small bug in stat:
> 
> stat -c %n *
> stat : option invalide -- 's'
> Saisissez « stat --help » pour plus d'informations.
> 
> ls
> address@hidden&.txt
> 
> stat is not able to list a direstory if a file start with a -

Thank you for your bug report but this is not a bug in stat but a
misunderstanding of how file globs operate with your command shell.

The '*' on your command line is expanded by the shell to all of the
files in the directory.  You have a filename that starts with a dash.
The resulting command line is the same as if you had placed the dash
on the command line yourself.

You can see this by using 'echo' to print out the command.

  $ echo stat -c %n *
  echo stat -c %n address@hidden&.txt

As you can see by using echo there is no difference between having a
file starting with a dash and placing an option with a dash on the
command line.  The only way to tell is for you to invoke the command
without the ambiguity.  Either use ./* to avoid having filenames start
with a dash or use "--" to signal to the command that there are no
further options.

Either:

  $ stat -c %n ./*

Or:

  $ stat -c %n -- *

Bob


--- End Message ---

reply via email to

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