From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 26 12:23:41 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 83F156C0 for ; Fri, 26 Apr 2013 12:23:41 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by mx1.freebsd.org (Postfix) with ESMTP id 5DD38160C for ; Fri, 26 Apr 2013 12:23:41 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id 4so2427865pdd.31 for ; Fri, 26 Apr 2013 05:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=A89oRx1Sp/TbHdEkhLeGN+/9W+ryzOvrcsB+XrtaLG4=; b=ppEw2grR7DYeCmnyUwh4eFBpvFfzS2MLixh9T2fwLUwF0zdhUwspmhtz0RZ11kG9IS yxTMWGvbnYR5TmaXoAvDJyJReW0ltrxP7WTIXdNm3QhNQltPicvIEViOn0d8IlY2HoL0 Ok1wYbhg6WRz4mVqfA9qhlSoe7h66Y6QjSsNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=A89oRx1Sp/TbHdEkhLeGN+/9W+ryzOvrcsB+XrtaLG4=; b=eMa/zH7rNDOdl+nwlDHFg5OSRHraJwuZwrZb3Cmt/G+6vj7MhJZSYBza5ZB6F/mZcY AjapGfPYhii70AVaNIA8MR83Ov3BGM5JJqGgA+EbB7PlXoKuUburKL8GcAZASARKs8A4 Bj1ICj/79jz/LRpak4sFqlDmO+Dj3xcrHuCpXGgv/85kIT9sNbC6CuiPv8LVkAml1SBD Jp0+e8s4ZbJCemFtS004EfJP2uEf8Fyjma4eNVCZA3L4AV/glk8UuQEUMt2LriRGDu5O x1r7KmNwPocu+9Ih0LYZw9B3B0dJXbjniwHR+BD5JvB/os2qG4wj3bgUeSjk7z9YChFf wzpQ== X-Received: by 10.68.253.232 with SMTP id ad8mr57368050pbd.164.1366979015672; Fri, 26 Apr 2013 05:23:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.159.97 with HTTP; Fri, 26 Apr 2013 05:23:05 -0700 (PDT) In-Reply-To: <20130426122214.GA9086@stack.nl> References: <20130426025049.GC50623@lor.one-eyed-alien.net> <20130426122214.GA9086@stack.nl> From: Eitan Adler Date: Fri, 26 Apr 2013 08:23:05 -0400 Message-ID: Subject: Re: Some improvements to rm(1) To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkhXU72ry/cxup3CQ1IByURTlCXd+/Aos/u/r7AaaAF+y2QxJs5ImC8wP4TCBK9hy3huJwm 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:23:41 -0000 On 26 April 2013 08:22, Jilles Tjoelker wrote: > 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 ? Yes, rm's functionality can be fully replicated by find. -- Eitan Adler