From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 26 12:22:30 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 19D644CB; Fri, 26 Apr 2013 12:22:30 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id D615D15EC; Fri, 26 Apr 2013 12:22:29 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 963621203DB; Fri, 26 Apr 2013 14:22:14 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 72E9728493; Fri, 26 Apr 2013 14:22:14 +0200 (CEST) Date: Fri, 26 Apr 2013 14:22:14 +0200 From: Jilles Tjoelker To: Eitan Adler Subject: Re: Some improvements to rm(1) Message-ID: <20130426122214.GA9086@stack.nl> References: <20130426025049.GC50623@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Hackers , Brooks Davis X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2013 12:22:30 -0000 On Thu, Apr 25, 2013 at 10:56:10PM -0400, Eitan Adler wrote: > On 25 April 2013 22:50, Brooks Davis wrote: > > On Thu, Apr 25, 2013 at 10:16:32PM -0400, Eitan Adler wrote: > >> Anyone have thoughts on the following? > >> commit 82c78ba923d8ce4a1bfbb309658c49021c8bb384 > >> Author: Eitan Adler > >> Date: Thu Apr 25 22:14:49 2013 -0400 > >> Take some improvements from DragonFlyBSD: > >> - add const where appropriate > >> - add static where appropriate > >> - fix a whitespace issues > > > > The no-op changes look more correct to me. > > I think the -x option seems a bit odd. What is the use case? At a > > first thought, it seems to raise more questions than it resolves. > It goes along with cp -x, find -x, and others. > Quick example #1: You have /usr/ports /usr/ports/distfiles as > different mount points it lets you wipe /usr/ports without wiping your > distfile cache. > Quick example #2: You have /usr/src/ null mounted in every user's > /home/ and you want to wipe one home directory. Hmm, isn't this already possible using find -x DIR -delete ? There will be an error message 'Device busy' about attempting to delete the mount point but this does not even affect the exit status and all files not under the mount point are removed. -- Jilles Tjoelker