Re: "FIND" command
From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 06/18/05
- Next message: bi-weekly: "A new reader? Welcome to comp.os.linux.misc, read this first if you're new here (FAQ)"
- Previous message: Noah Roberts: "Re: Using a U.S. Robotics Fax modem with Slackware 10.0"
- In reply to: dorantes: ""FIND" command"
- Next in thread: John-Paul Stewart: "Re: "FIND" command"
- Reply: John-Paul Stewart: "Re: "FIND" command"
- Reply: Netocrat: "Re: "FIND" command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: bi-weekly: "A new reader? Welcome to comp.os.linux.misc, read this first if you're new here (FAQ)"
- Previous message: Noah Roberts: "Re: Using a U.S. Robotics Fax modem with Slackware 10.0"
- In reply to: dorantes: ""FIND" command"
- Next in thread: John-Paul Stewart: "Re: "FIND" command"
- Reply: John-Paul Stewart: "Re: "FIND" command"
- Reply: Netocrat: "Re: "FIND" command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|