Date: Wed, 11 Mar 2015 21:36:45 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: Matt Tagg <wamatt@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: find with -delete option on absolute paths Message-ID: <20150311203645.GA30268@stack.nl> In-Reply-To: <CAOW4NdCmjqyhXzW3PmTMvOsckZL2jnJuVc7vx8Mk5=gVd4AwjQ@mail.gmail.com> References: <CAOW4NdCmjqyhXzW3PmTMvOsckZL2jnJuVc7vx8Mk5=gVd4AwjQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 10, 2015 at 08:31:52PM -0700, Matt Tagg wrote: > I believe this was discussed previously (2013), though I could not > find a resolution. > To recap, suppose we try deleting files on an absolute path: > matt@mtbook:/% find /tmp/foo/* -delete > find: -delete: /tmp/foo/bar.txt: relative path potentially not safe > As you can see it gives an error and quits. However if we instead try this: > matt@mtbook:/% gfind /tmp/foo/* -delete > GNU Find throws no error and works as expected ('bar.txt is deleted') > So as an end user, I find this rather confusing. How can I get the > same behavior with BSD Find out of the box? You can get the same behaviour by upgrading to FreeBSD 10 or newer. Before FreeBSD 10.0, find -delete did not allow deleting files given as arguments. This was because of an incorrect check and was fixed in SVN r253886. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150311203645.GA30268>