Subject: Re: CVS commit: src/usr.bin/find
To: None <>
From: Roland Illig <>
List: tech-userlevel
Date: 02/12/2007 08:03:16
der Mouse wrote:
>>In this case passing an open file won't help, as it is the directory
>>entry (ie the name) that has to be removed, not the open file.
> Passing an open file will indeed help, provided it's done right: pass a
> fd on the directory along with the name.  Then rm can fchdir() to the
> directory and unlink() the name, safely.

Another option would be:

find . -name '*.bak' -exec-in-dir rm -f -- {} \;