Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: recurse up



Perfect. Thanks.

                Anthony

On 31 Jul 2008 at 21:56:03, Mikael Magnusson wrote:
> 2008/7/31 Anthony Fletcher <arif@xxxxxxxxxxxxxxx>:
> > One can find files that live below the current directory via
> >
> >        ls **/README
> >
> > but how can one look for files in the parent, grand-parent, ...
> > directories?
> >
> > For example, suppose that the file /a/README exists and the current
> > directory is /a/b/c/d/e. Then, I'd like
> >
> >        ls .../README
> >
> > to glob expand to ../../../README.
> >
> > Any suggestions?
> 
> The man page says:
>        As a shorthand, `**/' is equivalent to `(*/)#'; note that this
> therefore  matches
>        files in the current directory as well as subdirectories.
> 
> So you can use (../)#README
> 
> -- 
> Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author