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 -- {} ;
Roland
|