This is the mail archive of the
cygwin
mailing list for the Cygwin project.
SV: LS and spaces in path names (the xth)
- From: "Peter J. Acklam" <pjacklam at online dot no>
- To: <cygwin at cygwin dot com>
- Cc: <pjacklam at online dot no>
- Date: Tue, 28 Jun 2005 15:35:34 +0200 (CEST)
- Subject: SV: LS and spaces in path names (the xth)
I don't see the problem.
> ls -hog "CD *"
> ls: CD *: No such file or directory
Of course. There is no file whose name is the four character string "CD *", so ls doesn't find anything.
> ls -hog "CD [12]*"
> ls: CD [12]*: No such file or directory
Ditto. There is no file whose name is the six character string "CD [12]*", so ls doesn't find it.
> ls -hog "CD*[12]*"
>
> WORKS.
What do you mean by "WORKS"? I get
$ ls -hog "CD*[12]*"
ls: CD*[12]*: No such file or directory
which is exactly as expected since there I have no file with the is no file whose name is the eight character string "CD*[12]*".
If you want to list the CD-files with spaces, try
$ ls -hog CD\ *
-rw-r--r-- 1 0 Jun 28 15:30 CD 1 - Multimedia.dat
-rw-r--r-- 1 0 Jun 28 15:30 CD 2 - Multimedia.dat
$ ls -hog "CD "*
-rw-r--r-- 1 0 Jun 28 15:30 CD 1 - Multimedia.dat
-rw-r--r-- 1 0 Jun 28 15:30 CD 2 - Multimedia.dat
Note that the asterisk can not be quoted.
Peter
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/