Bruce Dubbs wrote:
> Chris Staub wrote:
>> On 11/19/2009 08:30 PM, Bruce Dubbs wrote:
>>> Chris Staub wrote:
>>>> But there are the ".install" files in every subdir, not just in the
>>>> "linux" dir. I use:
>>>>
>>>> find dest/include -name .install -or -name ..install.cmd | xargs rm -fv
>>> Ahh.  I didn't realize they were in multiple directories.
>>>
>>>     find dest/include -name .install -or -name ..install.cmd -exec rm -v
>>> '{}' \;
>>
>> Not quite - the -exec only works on the last option before it...or 
>> something, I'm not quite sure exactly how to describe it technically, 
>> but in this case it would only operate on the files for the last -name 
>> option, or just the "..install.cmd" files. If you use -exec you'd need 
>> to put it after *each* -name, like this...
>>
>> find dest/include -name .install -exec rm -v '{}' \; -or -name 
>> ..install.cmd -exec rm -v '{}' \;
>>
>> So in this case I found it easier just to pipe it through xargs.
> 
> Really?  I did:
> 
> /mnt/lfs/sources/linux-2.6.30.2$ find dest/include -name .install -or 
> -name ..install.cmd -exec ls -l {} \;

Drat.  Never mind.  I see you are right.  However

   find dest/include -name .*install* -exec ls -l {} \;

does the right thing.  The asterisks and braces do not need to be quoted 
in bash, but the safe way would be to write:

   find dest/include -name '.*install*' -exec ls -l '{}' \;

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to