[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding pathname expansion
From: |
javajo91 |
Subject: |
Re: Question regarding pathname expansion |
Date: |
Fri, 15 Oct 2010 10:45:24 -0700 (PDT) |
Oops - never mind.
I see my error.
ls /usr* will list all files within usr & usr2 directories.
the / is needed to specify the files within.
Thank you!
javajo91 wrote:
>
> Morning -
>
> I'm reading "Learning the bash Shell" by Newham & Rosenblatt and have a
> question regarding pathname expansion and wildcards.
>
> They mention that wildcards can be used as part of a pathname.
> The example they give is that if you wanted to list all the files in the
> /usr & /usr2 directories you could simply type ls /usr*.
>
> I understand this.
>
> I'm having a problem however following the logic of this statement that
> says that in order to list only the files that begin with a b&e in these
> same directories you can type this:
>
> ls /usr*/[be]*
>
> If ls /usr* already lists all files in the /usr & /usr2 directories why do
> you need a forward slash before the set containing b&e?
>
>
> thank you for any assistance!
>
--
View this message in context:
http://old.nabble.com/Question-regarding-pathname-expansion-tp29972022p29973893.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.