Matthew Burgess wrote:

> Thanks guys, removing them at the source is obviously correct.  I'd 
> prefer this variant, though:
> 
> find dest/include -name .install --or -name ..install.cmd -delete
> 
> I believe that '-delete' is the recommended/race-free way of removing 
> files found by find(1), though I can't find any documentation support 
> this just yet.

This is a good solution, but there is one caveat from the man page:

Warnings: Don't forget that the find command line is evaluated as  an
expression,  so  putting -delete first will make find try to delete
everything below the starting points you specified.  When testing a find
command line that you later  intend  to  use  with  -delete, you should
explicitly specify -depth in order to avoid later surprises.  Because
-delete implies  -depth,  you  cannot usefully use -prune and -delete
together.

If we use the command correctly as above, there shouldn't be any 
problem.  We use the rm command too, and there is nothing to prevent a 
user from doing `sudo rm -rf /*` either.

We always have to remember that we like Linux because it lets us do what 
we specify, even when the user doesn't really understand what he's doing.

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

Reply via email to