[CentOS] listing files with spaces, using wildcard

Fri Feb 20 13:31:09 UTC 2009
bruce <bedouglas at earthlink.net>

hmm...

that'll work.. thanks... 


-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org]On
Behalf Of John Doe
Sent: Friday, February 20, 2009 5:24 AM
To: CentOS mailing list
Subject: Re: [CentOS] listing files with spaces, using wildcard



From: bruce <bedouglas at earthlink.net>
> goat a bunch of files in different dirs.. the files might have spaces
> 1foo_ aa_bb_cc.dog
> 2foo_aa_bbbb_cc.dog
> 3foo_aa_bb _ccc.dog
> 4foo_aa_bb_cc.dog
> 5foo_aa_bb_cc.dog
> 6foo_aa_bb_cc.dog
> i'm trying to figure out how i can do a complete list of all files with
> *foo*dog
> so i get the files with spaces and underlines...
> i thought simply doing somehting like
> ls '*foo_*.dog' and surrounding the filename with single quotes would
> work.. but it doesn't.
> thoughts/pointers/etc...

If you quote, it disables the completion...

$ echo *foo_*.dog
2foo_aa_bbbb_cc.dog 4foo_aa_bb_cc.dog 5foo_aa_bb_cc.dog 6foo_aa_bb_cc.dog

$ echo '*foo_*.dog'
*foo_*.dog

JD


      

_______________________________________________
CentOS mailing list
CentOS at centos.org
http://lists.centos.org/mailman/listinfo/centos