Subject: Re: CVS commit: src/usr.bin/find
To: Perry E. Metzger <perry@piermont.com>
From: SODA Noriyuki <soda@sra.co.jp>
List: tech-userlevel
Date: 02/08/2007 22:47:15
>>>>> On Thu, 08 Feb 2007 08:29:04 -0500,
"Perry E. Metzger" <perry@piermont.com> said:
>>>> The problem is that the -delete option is somewhat different from
>>>> what you expect from the -rm option.
>>> What do you think of as the difference?
>> For example, "find /usr/src -rm" just doesn't work.
> The man page seems to imply that find /usr/src -delete should
> work. Perhaps the documentation needs to be fixed.
Yes, this man page is not accurate.
> It will not attempt to delete a filename with a ``''
> character in its pathname relative to ``''. for
> security reasons.
This formatting is wrong.
Corresponding FreeBSD man page is:
It will not attempt to delete a filename with a ``/''
character in its pathname relative to ``.'' for
security reasons.
> That doesn't really describe what is wrong with find /usr/src -delete
Anyway, is this behavior what you expect by "find /usr/src -rm"?
I don't think so.
It will abort with the following message:
find: -rm: /usr/src: relative path potentially not safe
> Anyway, this is Unix -- we don't "del file" or "delete file", we
> "rm file"...
That's exactly why I don't prefer "-rm" for this option.
If it's "-rm", "find /usr/src -rm" should work.
--
soda