Date: Tue, 10 Mar 2015 21:54:26 -0700 From: "Chris H" <bsd-lists@bsdforge.com> To: freebsd-hackers@freebsd.org, Matt Tagg <wamatt@gmail.com> Subject: Re: find with -delete option on absolute paths Message-ID: <8170e39ad9c9cbecbc80406d3569dbea@ultimatedns.net> In-Reply-To: <244af0804267e6eaf7ddd43ffc7dd6e8@ultimatedns.net> References: <CAOW4NdCmjqyhXzW3PmTMvOsckZL2jnJuVc7vx8Mk5=gVd4AwjQ@mail.gmail.com>, <244af0804267e6eaf7ddd43ffc7dd6e8@ultimatedns.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Mar 2015 21:44:57 -0700 "Chris H" <bsd-lists@bsdforge.com> wrote > On Tue, 10 Mar 2015 20:31:52 -0700 Matt Tagg <wamatt@gmail.com> wrote > > > Hey BSD folks > > > > 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? Apologies. I was a bit distracted when I responded. I should have waited. What you are probably looking for is something like: find /tmp/foo/ -type f -delete Sorry. --Chris ---8<----- > --Chris > > > > Thanks > > - m > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8170e39ad9c9cbecbc80406d3569dbea>