View Single Post

  #4 (permalink)  
Old 03-08-2008
techjohnny@gmail.com
 
Posts: n/a
Default Re: Using Find with Regular Expressions.

On Mar 7, 2:51 pm, Baho Utot <baho-u...@invalid.org> wrote:
> On Fri, 07 Mar 2008 11:43:43 +0000, Toby A Inkster wrote:
> > techjoh...@gmail.com wrote:

>
> [putolin]
>
>
>
> >> For example, I have a directory that I would like to clean out ever so
> >> ofter, but don't want to touch 3 directories located in the same
> >> directory.

>
> > Why not just cd to the directory and "rm -f *"? Without the "-r", "rm"
> > doesn't recurse into directories.

>
> That would of course be too easy.
>
> --
> Tayo'y Mga Pinoy


Let's say there are 50 files and 50 directories, but I only want to
keep 3 or 4 directory and 1 file, now I can do rm -rf to each file and
directory, but I'm looking for a way to more automate this process.

I think applying the +i directory attribute is a solution that works
so far.

Thanks,

--TJ
Reply With Quote