From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 03:32:33 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED854802 for ; Wed, 11 Mar 2015 03:32:33 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B33E8301 for ; Wed, 11 Mar 2015 03:32:33 +0000 (UTC) Received: by obcuy5 with SMTP id uy5so6215441obc.11 for ; Tue, 10 Mar 2015 20:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=TM1i3BPEvEzq5qpEMnJcI5gh1HZx2RtQZYdx3WLhUT4=; b=D+SiWPdnTaYcxva27ocJMLyxSUOFjjuNFeZFJk00dpoczD/5jJ0Xj0IfCjt6/FMcuJ XML49EayLyU+4CcIQdrDHl88DdsXbMx2DuyyN58LocDllwbb0n4WD+j1PnyMNhPZvrAv w27h55O67f6wU+VevqiyPPLsLEz8Mm74dj8CaBi6c66wgpqAZmn1mJoNSwqKLH47Gctm slgUSCEbVkPGVlFlIgO0z6QIzlK1WwVdKtrS34fGr8KPEZv892AzxmEg6RADXXjVuxBN 7g2T2QrDip5jrP88rmAzNzc3JA0hYFcksp7bmZLZRhvd4e9vHY9ocDo1rJnooFrLFLSa RBUg== X-Received: by 10.60.97.35 with SMTP id dx3mr28408206oeb.6.1426044753066; Tue, 10 Mar 2015 20:32:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.116.133 with HTTP; Tue, 10 Mar 2015 20:31:52 -0700 (PDT) From: Matt Tagg Date: Tue, 10 Mar 2015 20:31:52 -0700 Message-ID: Subject: find with -delete option on absolute paths To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 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 03:32:34 -0000 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? Thanks - m