From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 04:52:50 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 688B7344 for ; Wed, 11 Mar 2015 04:52:50 +0000 (UTC) Received: from udns.ultimatedns.net (unknown [IPv6:2602:d1:b4d6:e600:4261:86ff:fef6:aa2a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2653EC77 for ; Wed, 11 Mar 2015 04:52:50 +0000 (UTC) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.14.9/8.14.9) with ESMTP id t2B4sQPo041348; Tue, 10 Mar 2015 21:54:26 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) To: freebsd-hackers@freebsd.org, Matt Tagg In-Reply-To: <244af0804267e6eaf7ddd43ffc7dd6e8@ultimatedns.net> References: , <244af0804267e6eaf7ddd43ffc7dd6e8@ultimatedns.net> From: "Chris H" Subject: Re: find with -delete option on absolute paths Date: Tue, 10 Mar 2015 21:54:26 -0700 Content-Type: text/plain; charset=UTF-8; format=fixed MIME-Version: 1.0 Message-id: <8170e39ad9c9cbecbc80406d3569dbea@ultimatedns.net> Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 04:52:50 -0000 On Tue, 10 Mar 2015 21:44:57 -0700 "Chris H" wrote > On Tue, 10 Mar 2015 20:31:52 -0700 Matt Tagg 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"