Subject: Re: multi find with different file outputs
To: SODA Noriyuki <soda@sra.co.jp>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-userlevel
Date: 09/24/2005 23:42:28
On Sun, 25 Sep 2005, SODA Noriyuki wrote:

> How about using "GNU find"-compatible options?
> i.e. -fprint and -fprint0?
> The option -fprint and -fprint0 take a filename as its parameter,
> instead of file descriptor number.
>
>> 3) Another idea could be:
>>    find / \( -name "*.core" -output 5 \) -o \( -user joe -output 6 \) \
>> 	5>core.dumps 6>joes.files
>
> This could be written as follows in GNU find:
>   find / \( -name "*.core" -fprint /dev/fd/5 \) -o \
> 	  \( -user joe -fprint /dev/fd/6 \) \
> 	5>core.dumps 6>joes.files

Learn something new every day. Thanks for the info. I just tried GNU find 
and it works like I expect:

find /etc \( -user bin -fprint ~/J \) -o \( -name "*pass*" -fprint ~/J2 \)

This looks like this would be good enough. I'll use that naming instead. 
And give it a try.

My plan is to use this for /etc/security to do three finds in one find.

Thanks again,

  Jeremy C. Reed

  	  	 	 technical support & remote administration
 	  	 	 http://www.pugetsoundtechnology.com/