Re: "FIND" command

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 06/18/05


Date: Fri, 17 Jun 2005 22:56:39 GMT

On comp.os.linux.misc, in
<1119035765.788722.314070@o13g2000cwo.googlegroups.com>,
"dorantes" wrote:

> Can someone help, I'm trying to use the "find" command to clean
> out home directories, but I want to skip certain directories
> (which I think I already got) by skipping certain group id
> no.'s, how can I skip files with certain extensions, such as
> .PRT/.BAT files.
>
> Thanks in advance...
>

find . -type f ! -name '*.PRT' -o ! -name '*.BAT'

To skip directories, you can use -prune, something like this:

find . -type d \( -name 'foo' -prune\) -o -type f ! -name ... -print

This syntax can be useful too:

find . -path './foo' -prune -o -print

AC



Relevant Pages

  • Re: "FIND" command
    ... dorantes wrote: ... > home directories, but I want to skip certain directories (which I think ... > I already got) by skipping certain group id no.'s, ... > with certain extensions, such as .PRT/.BAT files. ...
    (comp.os.linux.misc)
  • Re: "FIND" command
    ... dorantes wrote: ... > home directories, but I want to skip certain directories (which I think ... > I already got) by skipping certain group id no.'s, ... Peter ...
    (comp.os.linux.misc)
  • "FIND" command
    ... I'm trying to use the "find" command to clean out ... home directories, but I want to skip certain directories (which I think ... with certain extensions, such as .PRT/.BAT files. ...
    (comp.os.linux.misc)