Re: Find Question
- From: Rikishi42 <skunkworks@xxxxxxxxxxxxx>
- Date: Fri, 23 Jan 2009 00:51:23 +0100
On 2009-01-19, George <me@xxxxxx> wrote:
I want to write a find command that looks only in certain subdirectories
of a certain directory - say we have foo as the top-level directory and
foo1, foo2 as subdirectories. I want my command to look into files in foo
and foo1, but not foo2.
If I write (when the current directory is foo) find . -type f -prune this
will not look in foo1, which is something I want to happen.
A look at the documentation didn't produce any results.
Look into the '-path' variable. Maybe '--path'
Can't remember the exact syntax and don't have my notes here. But try
something like this:
find foo/ -path 'foo1' -type f -iname "myfile*" ...
That would start looking in foo, for any subdir foo1, containing files
starting with "myfile", case insensitive.
Hope that might set you on the right track.
--
Elevators smell different to midgets
.
- Follow-Ups:
- Re: Find Question
- From: Michael Paoli
- Re: Find Question
- References:
- Find Question
- From: George
- Find Question
- Prev by Date: Re: report which line of script we are at
- Next by Date: Re: Removing every file except one
- Previous by thread: Re: Find Question
- Next by thread: Re: Find Question
- Index(es):
Relevant Pages
|