X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Thu, 15 Jun 2000 13:28:33 +0200 (MET DST) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: djgpp-workers AT delorie DOT com Subject: Re: "ls" bug ? In-Reply-To: <200006151133.NAA01575@cerbere.u-strasbg.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 15 Jun 2000, Pierre Muller wrote: > Doing "ls *.exe " > > gives me invalid option -- . [...] > file with name -gstab.exe > (note the leading minus !) That's exactly your problem. ls *.exe expands to 'ls -gstab.exe'. 'ls' sees the '-' and thinks you're passing it options. This is not a bug in ls, but a slightly incorrect way of using it. To pass filenames beginning with '-' to any Unix-borne utility, you have to inform it that these command line arguments are not options. The '--' options does that: ls -- *.exe will work. Conclusion: don't use filenames beginning with a '-'. Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.