From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 20:31:56 2012 Received: (at submit) by debbugs.gnu.org; 10 Sep 2012 00:31:56 +0000 Received: from localhost ([127.0.0.1]:50818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TArut-0003FW-Hd for submit@debbugs.gnu.org; Sun, 09 Sep 2012 20:31:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33055) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAruq-0003FO-9F for submit@debbugs.gnu.org; Sun, 09 Sep 2012 20:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAruJ-0005OV-FQ for submit@debbugs.gnu.org; Sun, 09 Sep 2012 20:31:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:52047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAruJ-0005OR-CD for submit@debbugs.gnu.org; Sun, 09 Sep 2012 20:31:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAruI-0000tM-GQ for bug-coreutils@gnu.org; Sun, 09 Sep 2012 20:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAruH-0005O6-Cs for bug-coreutils@gnu.org; Sun, 09 Sep 2012 20:31:18 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:37070 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAruH-0005Nt-2o for bug-coreutils@gnu.org; Sun, 09 Sep 2012 20:31:17 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8A0VC8b926694 for ; Sun, 9 Sep 2012 17:31:14 -0700 Message-ID: <504D34D0.2050607@tlinx.org> Date: Sun, 09 Sep 2012 17:31:12 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) If you are going to only provide 1 mode of functionality, it should be to only rmdir dirs on the same file system as the starting args. Instead it follows network mount points doing who knows what. I already know that it has in the past, on network'd file systems, gone ahead and did a 'pre-delete' on a dir that read as 'unwritable' due to files being in the dir -- and renamed it to some obscure name for later processing when it thought it would make a difference. While that problem was fixed, it was caused by a change in the linux-based netword-file-share software. Having rmdir follow all network mounts and deleting remote files would seem to be a nasty potential security issue. Note, using shell to do this, is the normal recommended way to do this, just like rm I'm told, is the recommended solution, so following those instructions, I tried to use "rmdir **", (since rmdir has no recursive option, it is mandatory to use shell. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 21:05:35 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 01:05:35 +0000 Received: from localhost ([127.0.0.1]:50864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAsRT-00043W-C3 for submit@debbugs.gnu.org; Sun, 09 Sep 2012 21:05:35 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:60582) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAsRQ-00043N-KX for 12400@debbugs.gnu.org; Sun, 09 Sep 2012 21:05:34 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 0185439E800A; Sun, 9 Sep 2012 18:05:00 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hnCXB4P0hzLN; Sun, 9 Sep 2012 18:04:59 -0700 (PDT) Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 7D8A239E8007; Sun, 9 Sep 2012 18:04:59 -0700 (PDT) Message-ID: <504D3CB6.4020007@cs.ucla.edu> Date: Sun, 09 Sep 2012 18:04:54 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Linda Walsh Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> In-Reply-To: <504D34D0.2050607@tlinx.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Shouldn't that be 'users "curse" rmdir'? All rmdir implementations behave that way; GNU rmdir is no different. It's not clear to me why 'rmdir /foo/a /bar/b' should by default reject the attempt to remove '/bar/b' merely because it's on a different file system from '/foo/a'. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 21:41:46 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 01:41:46 +0000 Received: from localhost ([127.0.0.1]:50883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAt0T-0004r9-RY for submit@debbugs.gnu.org; Sun, 09 Sep 2012 21:41:46 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:33512 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAt0R-0004r2-Uh for 12400@debbugs.gnu.org; Sun, 09 Sep 2012 21:41:44 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8A1erYV935025; Sun, 9 Sep 2012 18:40:55 -0700 Message-ID: <504D4525.90300@tlinx.org> Date: Sun, 09 Sep 2012 18:40:53 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> In-Reply-To: <504D3CB6.4020007@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Paul Eggert wrote: > Shouldn't that be 'users "curse" rmdir'? > > All rmdir implementations behave that way; > GNU rmdir is no different. > > It's not clear to me why 'rmdir /foo/a /bar/b' should by default > reject the attempt to remove '/bar/b' merely because it's on a > different file system from '/foo/a'. ---- Then why have the option for 'rm'? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 21:54:20 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 01:54:20 +0000 Received: from localhost ([127.0.0.1]:50887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAtCd-00058d-U1 for submit@debbugs.gnu.org; Sun, 09 Sep 2012 21:54:20 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34824) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAtCc-00058W-1b for 12400@debbugs.gnu.org; Sun, 09 Sep 2012 21:54:18 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id B807639E800A; Sun, 9 Sep 2012 18:53:45 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 74BilZuOf-FF; Sun, 9 Sep 2012 18:53:45 -0700 (PDT) Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 67A9539E8007; Sun, 9 Sep 2012 18:53:45 -0700 (PDT) Message-ID: <504D482C.9090902@cs.ucla.edu> Date: Sun, 09 Sep 2012 18:53:48 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Linda Walsh Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> <504D4525.90300@tlinx.org> In-Reply-To: <504D4525.90300@tlinx.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On 09/09/2012 06:40 PM, Linda Walsh wrote: >> It's not clear to me why 'rmdir /foo/a /bar/b' should by default >> reject the attempt to remove '/bar/b' merely because it's on a >> different file system from '/foo/a'. > ---- > Then why have the option for 'rm'? There is no such option for 'rm'. The --one-file-system option is a different option; it doesn't have the behavior mentioned above. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 09 23:38:28 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 03:38:28 +0000 Received: from localhost ([127.0.0.1]:50929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAupQ-0007Ws-Ae for submit@debbugs.gnu.org; Sun, 09 Sep 2012 23:38:28 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:36887 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAupO-0007Wl-P3 for 12400@debbugs.gnu.org; Sun, 09 Sep 2012 23:38:27 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8A3boUR949469; Sun, 9 Sep 2012 20:37:52 -0700 Message-ID: <504D608E.6020204@tlinx.org> Date: Sun, 09 Sep 2012 20:37:50 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> <504D4525.90300@tlinx.org> <504D482C.9090902@cs.ucla.edu> In-Reply-To: <504D482C.9090902@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Paul Eggert wrote: > On 09/09/2012 06:40 PM, Linda Walsh wrote: >>> It's not clear to me why 'rmdir /foo/a /bar/b' should by default >>> reject the attempt to remove '/bar/b' merely because it's on a >>> different file system from '/foo/a'. >> ---- >> Then why have the option for 'rm'? > > There is no such option for 'rm'. The --one-file-system > option is a different option; it doesn't have the behavior > mentioned above. Right...but I'm not using the behavior described above, I'm using the wildcard option rm ** In the same way...ahhh....so when I asked for code for rm -fr . I didn't included the code: Priv->run([$Rm, "--one-file-system", "-fr", "."]); rm -rf * .[!.] .??* If I understand you correctly, rm --one-file-system -fr * .[1.] .??* isn't going to stay on one file system. So is that a bug in rm or in shell? or how do I remove all the files in /tmp, but not have it descend into any file systems mounted in tmp? Cuz if rmdir using wildcards won't work with --one-file-system, I'm guessing it won't work in 'rm' either. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 01:15:16 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 05:15:16 +0000 Received: from localhost ([127.0.0.1]:51051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwL6-0001Qp-E0 for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:15:16 -0400 Received: from joseki.proulx.com ([216.17.153.58]:46711) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwL4-0001Qh-NE for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 01:15:15 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id E273421436; Sun, 9 Sep 2012 23:14:40 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 9BCA92DC73; Sun, 9 Sep 2012 23:14:40 -0600 (MDT) Date: Sun, 9 Sep 2012 23:14:40 -0600 From: Bob Proulx To: Linda Walsh Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... Message-ID: <20120910051440.GA2709@hysteria.proulx.com> References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> <504D4525.90300@tlinx.org> <504D482C.9090902@cs.ucla.edu> <504D608E.6020204@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504D608E.6020204@tlinx.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Linda Walsh wrote: > or how do I remove all the files in /tmp, but not have it descend > into any file systems mounted in tmp? I think it is really problematic to mount filesystems under /tmp. That would be a really crazy situation. I wouldn't do it. But... find /tmp -xdev -mindepth 1 -delete -xdev Don't descend directories on other filesystems. The -mindepth 1 prevents it from matching /tmp itself. Bob From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 01:23:13 2012 Received: (at submit) by debbugs.gnu.org; 10 Sep 2012 05:23:13 +0000 Received: from localhost ([127.0.0.1]:51063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwSn-0001cB-6V for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:23:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59927) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwSk-0001c4-Af for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:23:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAwSC-0003zK-FS for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:22:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAwSC-0003zF-C6 for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:22:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAwSB-0005Tx-E2 for bug-coreutils@gnu.org; Mon, 10 Sep 2012 01:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAwSA-0003yg-Cy for bug-coreutils@gnu.org; Mon, 10 Sep 2012 01:22:35 -0400 Received: from joseki.proulx.com ([216.17.153.58]:44190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAwSA-0003yG-5b for bug-coreutils@gnu.org; Mon, 10 Sep 2012 01:22:34 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 08C2421436 for ; Sun, 9 Sep 2012 23:22:31 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id ADBD32DC73; Sun, 9 Sep 2012 23:22:31 -0600 (MDT) Date: Sun, 9 Sep 2012 23:22:31 -0600 From: Bob Proulx To: bug-coreutils@gnu.org Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... Message-ID: <20120910052231.GB2709@hysteria.proulx.com> Mail-Followup-To: bug-coreutils@gnu.org References: <504D34D0.2050607@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504D34D0.2050607@tlinx.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Linda Walsh wrote: > If you are going to only provide 1 mode of functionality, it should > be to only rmdir dirs on the same file system as the starting args. But rmdir really only removes the directories you tell it. What is the command you are complaining about? Are you using --parents or something? > Instead it follows network mount points doing who knows what. Doing rmdir? > I already know that it has in the past, on network'd file systems, > gone ahead and did a 'pre-delete' on a dir that read as 'unwritable' > due to files being in the dir -- and renamed it to some obscure name > for later processing when it thought it would make a difference. You are probably talking about the nfs last close problem. NFS renames files to a .nfsXYZ where XYZ is a unique random string. If it were a local stateful filesystem it would be able to implement this correctly. But for a remote networked filesystem it can only be emulated by doing thins like renaming. Search for nfs last close problem and you will see the issue. > Having rmdir follow all network mounts and deleting remote files would seem > to be a nasty potential security issue. But rmdir only removes the directories you tell it to remove. > Note, using shell to do this, is the normal recommended way to do this, > just like rm I'm told, is the recommended solution, so > following those instructions, I tried to use "rmdir **", (since rmdir has > no recursive option, it is mandatory to use shell. There are two pieces there. One is that the shell, if it is one of the magic shells that supports **, will expand that into an explicit list of option arguments for the rmdir command. The other is the rmdir command which will simply get a list of option arguments. By doing it that way there is no way for rm to know that they are anything other than explicitly named directories to be removed. If you want a recursive option why not use 'rm -rf'? There is always 'find' with the -delete option. But regardless there has been the find -exec option. find /some/path -type d -delete find /some/path -depth -type d -exec rmdir {} + Bob From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 01:25:05 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 05:25:05 +0000 Received: from localhost ([127.0.0.1]:51067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwUa-0001f6-Pp for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:25:04 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:40208) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwUY-0001el-2T for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 01:25:03 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8C25839E800D; Sun, 9 Sep 2012 22:24:28 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mj5w4gpHDrKv; Sun, 9 Sep 2012 22:24:28 -0700 (PDT) Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 38E1639E8007; Sun, 9 Sep 2012 22:24:28 -0700 (PDT) Message-ID: <504D7990.9080909@cs.ucla.edu> Date: Sun, 09 Sep 2012 22:24:32 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Linda Walsh Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> <504D4525.90300@tlinx.org> <504D482C.9090902@cs.ucla.edu> <504D608E.6020204@tlinx.org> In-Reply-To: <504D608E.6020204@tlinx.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) On 09/09/2012 08:37 PM, Linda Walsh wrote: > I'm using the wildcard option rm ** Then why is this bug report about rmdir? I'm afraid that your bug report was incoherent, as was your followup. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 01:50:07 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 05:50:07 +0000 Received: from localhost ([127.0.0.1]:51090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwso-0002HK-Tj for submit@debbugs.gnu.org; Mon, 10 Sep 2012 01:50:07 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:41206 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAwsl-0002HA-Ju for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 01:50:05 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8A5nQWP967220; Sun, 9 Sep 2012 22:49:28 -0700 Message-ID: <504D7F66.3050504@tlinx.org> Date: Sun, 09 Sep 2012 22:49:26 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <504D3CB6.4020007@cs.ucla.edu> <504D4525.90300@tlinx.org> <504D482C.9090902@cs.ucla.edu> <504D608E.6020204@tlinx.org> <504D7990.9080909@cs.ucla.edu> In-Reply-To: <504D7990.9080909@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Paul Eggert wrote: > On 09/09/2012 08:37 PM, Linda Walsh wrote: >> I'm using the wildcard option rm ** > > Then why is this bug report about rmdir? Because it was rmdir that chased off to network FS's when I used wildcard syntax with it as I was told to do with rm. This is why I didn't want to use shell. I knew something would go wrong, now I should use find .. how many work-arounds for the bugs in rm are you going to suggest? If the workaround for rm to remove all files doesn't work with --one-file-system, then it's not a workaround. As for rmdir, I usually do use 'find' when I want to do what I did, but having been told that doing so wasn't safe, on another list as they'd had it fail (as I did -- it tried to remove a dir with files in it -- something I hadn't expected to ever happen, but due to a change in the Samba, and how it responded to some network request, the OS promptly tried to rename what it thought was a locked file into .... It was only because I was editing a file in it at the time that I caught it at all and figured out what happened. Between that, and being told to use shell wildcards to remove everything under a mount point, I, naturally, thought to use it with rmdir. Not realizing that I needed that --one-file-system to be there for that to work which rmdir doesn't need as it doesn't expect to be used recursively. Which points back at at the bad idea it is to use wildcards to get around broken functionality. rm ** removes all the files under a dir, and rmdir ** removes all the empty directories under a dir. It was the natural progression of avoiding a crippled feature in rm... From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 02:06:29 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 06:06:29 +0000 Received: from localhost ([127.0.0.1]:51101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAx8e-0002e7-Ph for submit@debbugs.gnu.org; Mon, 10 Sep 2012 02:06:28 -0400 Received: from c-67-162-91-36.hsd1.in.comcast.net ([67.162.91.36]:39791 helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TAx8d-0002e0-06 for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 02:06:27 -0400 Received: (qmail 2519 invoked by uid 1000); 10 Sep 2012 06:05:53 -0000 Message-ID: <20120910060552.2518.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#12400: rmdir runs "amok", To: coreutils@tlinx.org (Linda Walsh) Date: Mon, 10 Sep 2012 01:05:52 -0500 (GMT+5) In-Reply-To: <504D7F66.3050504@tlinx.org> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linda Walsh writes: > > rm ** removes all the files under a dir, and rmdir ** removes all the empty > directories > under a dir. It was the natural progression of avoiding a crippled feature in rm... > [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [67.162.91.36 listed in dnsbl.sorbs.net] 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [67.162.91.36 listed in zen.spamhaus.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linda Walsh writes: > > rm ** removes all the files under a dir, and rmdir ** removes all the empty > directories > under a dir. It was the natural progression of avoiding a crippled feature in rm... > [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [67.162.91.36 listed in zen.spamhaus.org] 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [67.162.91.36 listed in dnsbl.sorbs.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS Linda Walsh writes: > > rm ** removes all the files under a dir, and rmdir ** removes all the empty > directories > under a dir. It was the natural progression of avoiding a crippled feature in rm... > For someone who claims to have been unix for so long that you consider 4.3BSD a recent deviation from the norm, you are awfully clueless about how everything works. Or pretending to be so as a way of escalating the drama. And the problem you won't quit bugging everyone about is hardly a problem anyway; how often does the "remove everything under this directory, but not crossing mount points, and not removing this directory itself" operation actually prove necessary? What you're doing is *weird* and there's no reason to *expect* it to be a less-than-10-character command. It's still a one-liner with find, as you've already been shown. Unix deliberately presents a single unified filesystem namespace in which mount points look like normal directories. Recursion that traverses all directories except mount points is *weird*. And mounting something under /tmp that isn't logically part of /tmp (and subject to the same cleanup policy) is *very weird*. Please stop filing bug reports resulting from your own weirdness. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 03:29:59 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 07:29:59 +0000 Received: from localhost ([127.0.0.1]:51176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAyRT-0004b3-Aj for submit@debbugs.gnu.org; Mon, 10 Sep 2012 03:29:59 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:43735 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAyRQ-0004av-O5 for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 03:29:57 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8A7TJqu984947; Mon, 10 Sep 2012 00:29:21 -0700 Message-ID: <504D96CF.70404@tlinx.org> Date: Mon, 10 Sep 2012 00:29:19 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#12400: rmdir runs "amok", References: <20120910060552.2518.qmail@kosh.dhis.org> In-Reply-To: <20120910060552.2518.qmail@kosh.dhis.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Alan Curry wrote: > Linda Walsh writes: >> rm ** removes all the files under a dir, and rmdir ** removes all the empty >> directories >> under a dir. It was the natural progression of avoiding a crippled feature in rm... >> > > For someone who claims to have been unix for so long that you consider 4.3BSD > a recent deviation from the norm, you are awfully clueless about how > everything works. Or pretending to be so as a way of escalating the drama. --- Sorry, the version of rm i've used honored the '-f' flag... Playing mommy to users -- that's what you'd expect from a university version of unix. You call programs that play mommy the norm? > > And the problem you won't quit bugging everyone about is hardly a problem > anyway; how often does the "remove everything under this directory, but not > crossing mount points, and not removing this directory itself" operation > actually prove necessary? ---- Things can be easily mounted and cross mounted under linux. But I didn't wanto to rm everything, I was using rmdir to remove empty directories. I tried to use rmdir in a recusive form like the only supported recursive version of rm -- one that uses wildcards. You can't play mommie with 'rm' and expect people not to use such behaviors with other commands. If you are going to treat people like children to protect them from themselves, then don't be surprised when they blame you for your inadequacies. You can't have it both ways -- the moral superiority of thinking you are protecting people, yet the complete irresponsibility when the consequences of teaching unthinking ways comes back to haunt you. > > What you're doing is *weird* and there's no reason to *expect* it to be a > less-than-10-character command. It's still a one-liner with find, as you've > already been shown. I regularly clean out directories. It's rare that I will have mounted something there. But I've had the rm follow links it didn't understand on other OS's that were not unix, but tried to be posix compatible -- and follow them into a recycle bin, where it found pointers to a whole bunch of places on the file system. > > Unix deliberately presents a single unified filesystem namespace in which > mount points look like normal directories. Recursion that traverses all > directories except mount points is *weird*. ---- Is that why almost all unix command have options to prevent them from doing just that... and not it is not weird. Only under BSD is it weird, but elsewhere, people mount things all over the place. People are being encouraged in some circles to use mounts over a softlink -- > And mounting something under /tmp that isn't logically part of /tmp (and > subject to the same cleanup policy) is *very weird*. --- I don't have anything mounted under my /tmp, but I could easily see a dir there being used as a scratch dir or a place to mount a scratch volume temporarily. If someone runs a program that does such a delete using BSD crippled utils that cause bad behaviors, telling them they are weird as a response is perfect for someone who thinks the world revolves around them and anyone who does anything differently is 'weird'.... That's really special. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 03:40:49 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 07:40:49 +0000 Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAybx-0004sf-0u for submit@debbugs.gnu.org; Mon, 10 Sep 2012 03:40:49 -0400 Received: from c-67-162-91-36.hsd1.in.comcast.net ([67.162.91.36]:39865 helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TAybv-0004sX-Vi for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 03:40:48 -0400 Received: (qmail 4876 invoked by uid 1000); 10 Sep 2012 07:40:13 -0000 Message-ID: <20120910074013.4875.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#12400: rmdir runs "amok", To: coreutils@tlinx.org (Linda Walsh) Date: Mon, 10 Sep 2012 02:40:13 -0500 (GMT+5) In-Reply-To: <504D96CF.70404@tlinx.org> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linda Walsh writes: > > Sorry, the version of rm i've used honored the '-f' flag... > Playing mommy to users -- that's what you'd expect from a university version > of unix. The people with @gnu.org addresses may be inhibited from telling you to shut up. So I'm telling you, please shut up. You're not a constructive contributor in any way. You're just an incompetent user who thinks that every time you do something stupid, it must be someone else's fault for not designing the world around your stupidity. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, https://senderscore.org/blacklistlookup/ [67.162.91.36 listed in bl.score.senderscore.com] 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [67.162.91.36 listed in zen.spamhaus.org] 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [67.162.91.36 listed in dnsbl.sorbs.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linda Walsh writes: > > Sorry, the version of rm i've used honored the '-f' flag... > Playing mommy to users -- that's what you'd expect from a university version > of unix. The people with @gnu.org addresses may be inhibited from telling you to shut up. So I'm telling you, please shut up. You're not a constructive contributor in any way. You're just an incompetent user who thinks that every time you do something stupid, it must be someone else's fault for not designing the world around your stupidity. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.3 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [67.162.91.36 listed in zen.spamhaus.org] 0.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [67.162.91.36 listed in dnsbl.sorbs.net] 1.3 RCVD_IN_RP_RNBL RBL: Relay in RNBL, https://senderscore.org/blacklistlookup/ [67.162.91.36 listed in bl.score.senderscore.com] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.0 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS Linda Walsh writes: > > Sorry, the version of rm i've used honored the '-f' flag... > Playing mommy to users -- that's what you'd expect from a university version > of unix. The people with @gnu.org addresses may be inhibited from telling you to shut up. So I'm telling you, please shut up. You're not a constructive contributor in any way. You're just an incompetent user who thinks that every time you do something stupid, it must be someone else's fault for not designing the world around your stupidity. If you'd posted a description of your problem on a *help* forum, you'd get suggestions on how to solve it correctly. But you don't want to admit that you need help, you'd rather to clutter up the bug tracker with whining messages your failed attempts to solve your problem based on your supposed knowledge of dead Unix variants from bankrupt companies. Shut up. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 10 06:49:48 2012 Received: (at 12400) by debbugs.gnu.org; 10 Sep 2012 10:49:48 +0000 Received: from localhost ([127.0.0.1]:51467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB1Yp-0000vD-Kf for submit@debbugs.gnu.org; Mon, 10 Sep 2012 06:49:47 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:51190 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TB1Ym-0000v4-Eh for 12400@debbugs.gnu.org; Mon, 10 Sep 2012 06:49:45 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.5/8.14.4/SuSE Linux 0.8) with ESMTP id q8AAn7LT030004; Mon, 10 Sep 2012 03:49:09 -0700 Message-ID: <504DC5A3.8040803@tlinx.org> Date: Mon, 10 Sep 2012 03:49:07 -0700 From: Linda Walsh User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: Alan Curry Subject: Re: bug#12400: rmdir runs "amok", References: <20120910074013.4875.qmail@kosh.dhis.org> In-Reply-To: <20120910074013.4875.qmail@kosh.dhis.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Alan Curry wrote: > Linda Walsh writes: >> Sorry, the version of rm i've used honored the '-f' flag... >> Playing mommy to users -- that's what you'd expect from a university version >> of unix. > > The people with @gnu.org addresses may be inhibited from telling you to > shut up. So I'm telling you, please shut up. You're not a constructive > contributor in any way. ---- That's because of obstructive know-it-all people like you who think anyone who is not like you is wierd and has a problem. > You're just an incompetent user who thinks that every > time you do something stupid, it must be someone else's fault for not > designing the world around your stupidity. ---- This only makes it obvious you didn't win anything -- you can't argue against my points based on engineering grounds -- it is only because you must obey your corporate masters that you resort to personal attacks on the messenger. > If you'd posted a description of your problem on a *help* forum, you'd get > suggestions on how to solve it correctly. But you don't want to admit that > you need help, you'd rather to clutter up the bug tracker with whining > messages your failed attempts to solve your problem based on your supposed > knowledge of dead Unix variants from bankrupt companies. === Every one of those dead variants died after going POSIX. Now I see GNU going that way. Do the math. You seem to think I have a problem other than what I stated. I need a remove utility that does what rm is advertised to do without the special case POSIX requirement(s?). I'd like a utility that had intelligence, but that would be way over your head. Why shouldn't "rm dir/" remove an empty directory? Why shouldn't -f, do what it means -- ignore errors and delete what it can? Why shouldn't rm use rm "dir/." do something useful, safely -- why do you insist on it doing nothing more than flaunting it's inability to do anything useful? When I point out that I want to remove all files under a directory AND stay on a file system -- then you call me weird -- because you have no solution. It can't be done with 'rm'. You claim it is weird? why have "--one-file-system if the command is SUPPOSED to traverse network file systems? you keep making statements like you know something about all users and if they come up with a case that doesn't fit into your narrow predefined world view, it's they who have the problem. Software is supposed to empower users -- not be used to abuse them -- your use of software is screw users and push how right you are and how much of a winner you are -- by putting them down. If they want to constructively add to a command, they are not allowed because it is required that certain features not be allowed by something that is supposed to be a compatibility guideline of what to provide to support compliant programs -- it's not supposed to be about what NOT to provide... It was a list describing a minimal feature set -- NOT a maximal or limiting feature set. You want me to shutup? Then get out of the way and stop hogging the pot, cause people like you block everyone else from making anything better. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 03:33:00 2019 Received: (at 12400) by debbugs.gnu.org; 18 Jan 2019 08:33:00 +0000 Received: from localhost ([127.0.0.1]:35641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkPaG-0004F8-Fb for submit@debbugs.gnu.org; Fri, 18 Jan 2019 03:33:00 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkPaF-0004En-05; Fri, 18 Jan 2019 03:32:59 -0500 Received: by mail-pg1-f195.google.com with SMTP id n2so5718179pgm.3; Fri, 18 Jan 2019 00:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=4F+++3kNPVOWzF6onkB4NlrDdIjjTeERhfxJTLpl/T8=; b=XpO6ytrokDMa9GzT2aWSetLkq/uMk0o1Bf8AyYMLYi5nOloz4Zc0GpduIjhH3QJEJo /7PP3B7S5pxH8Ig1paPuOg5/6mjGVSKeUS5I2yP2VNMXyhLQbsjhA9955EWcd/JGb6fS WwRu5GVHWiyYy5CHm2s0IiaW95Lnd5wvjt0fFEy4MzZWg7m46ndNToddhALol+eoORrr eu5iJYC+7np4LpSiCljA4z3tnsfMUUfXr3KxuyNPPiZOFdC1nKmxSVtFYC9JWF5X55gn myRcAoOa8dKXtvUlU/p8RYgL8npuWi0Ori5fY3FAFpXFYr4+GO1u76czAOpcrpEplmtM m7tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4F+++3kNPVOWzF6onkB4NlrDdIjjTeERhfxJTLpl/T8=; b=pvkm0u9Is02Zu7Rd9X5l+AjkoK2nV+n/HADsMXZiv3ENVt7qC8sCdYzoGpEWa5rbQa NrqBadjcBChsSioF9/HCDiL8tdlv7GwHuaVoEiHdEFa2k6MinXMvxTHFRjSr784YgSMV nxQo8bXUgSQRj5RM55Usd/4/GYEWpNswi6l/4p5egZcGhFD7joWJyYXDy1WGMoKYUHwP L5da/CHnjv3yEYZL9TcwjRfBGzICvm8P9iXCiy+52mLZOs8x0yftrSmyuFtK76BhaIUt 5syyLy21qEbTT2iU92ZfzE1fgCepRjmpEcsEnpR/8/3O9NUdY1bpVTw3ZzmdVeZlu15y 0p0Q== X-Gm-Message-State: AJcUukfkrp1FZ2YgASMdrpNW0zxEpk6IKZHWgBKFm/vqHbZ99tet4DR3 /k9QUfNuSzJXzgb27J6UM+FN1fxND7I= X-Google-Smtp-Source: ALg8bN43/Z55cWSGgfrl/J6OUdsr/LWaKE2/zWlfpJScNwCPIsRnjE/85Fqb4xakaoKktyPjS/zXJg== X-Received: by 2002:a62:6408:: with SMTP id y8mr18299732pfb.202.1547800372385; Fri, 18 Jan 2019 00:32:52 -0800 (PST) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id g190sm7233731pgc.28.2019.01.18.00.32.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 00:32:51 -0800 (PST) Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... To: 12400@debbugs.gnu.org References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> From: Assaf Gordon Message-ID: <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> Date: Fri, 18 Jan 2019 01:32:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20120910052231.GB2709@hysteria.proulx.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) retitle 12400 rmdir: add --one-file-system option severity 12400 wishlist tags 12400 wontfix stop (triaging old bugs) Hello, On 2012-09-09 11:22 p.m., Bob Proulx wrote: > Linda Walsh wrote: >> If you are going to only provide 1 mode of functionality, it should >> be to only rmdir dirs on the same file system as the starting args. > [...] > But rmdir only removes the directories you tell it to remove. > [...] > If you want a recursive option why not use 'rm -rf'? > > There is always 'find' with the -delete option. But regardless there > has been the find -exec option. > > find /some/path -type d -delete > > find /some/path -depth -type d -exec rmdir {} + > With no further comments in 6 years, I'm closing this request. regards, - assaf From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 18 05:52:43 2019 Received: (at control) by debbugs.gnu.org; 18 Jan 2019 10:52:43 +0000 Received: from localhost ([127.0.0.1]:35736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkRlT-00059O-AB for submit@debbugs.gnu.org; Fri, 18 Jan 2019 05:52:43 -0500 Received: from mail-pg1-f177.google.com ([209.85.215.177]:39942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkRlR-00059A-JM for control@debbugs.gnu.org; Fri, 18 Jan 2019 05:52:41 -0500 Received: by mail-pg1-f177.google.com with SMTP id z10so5889113pgp.7 for ; Fri, 18 Jan 2019 02:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=r2wu53gd01GjO2rhRziVqnDSEldgKlG5FQW+MLErpNs=; b=nADS44ntzLIUyj3PDFwcyZH7sZd8x2c5BqGU3cgb1J7ZqIrdB/jaG13KDUEUCTOOH3 ccM3boaxjea3rR0VeVVXw56FLr5lDc20aH5kcDs81D2W4L94eSOY1k69wilCkMQc4ItR uIgPsbE0yIG23+npGr42C4WfbkGYTD72q4O1zn1u/sffGcIhAdshOhXEbMwmO/F0CqzK uoYW0yn1qS7zsd0xdj58s9QdqCE/y4kiaRkgEg26yLcianS1Rovqvdrdkd5k1QQCd1DQ 1MOszeyOtilo/ojhAUFvIHxcPFb2aDSicvgyX22hxuDq7kTmEp9VOmIWYnZVXBQ6iimn uBtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=r2wu53gd01GjO2rhRziVqnDSEldgKlG5FQW+MLErpNs=; b=nkxc8ZtLQdun+IqB5hq2lq7F44J3+89KNLj3H/EdrGWAdIQUK48Ksc3Zo+FAzJCmmA H7Fad4Ot3DLqKfe65WvU+oy9tYAuEV7HD//tnjwyjglHIc0rqDdO4ID7wvLx+PL/dqtZ h7HG7je8Q2rpmHyx1fVErpgU8Sit/1HNps2euIrq4XX63VY5pWU0MPRrlZkqABbSKgo3 HnVbxaQyVNpzNor21MlQEEM4yGDi51uYPf7DfwwciJzBKGsIKTn5wUPrHCxYkS4nEhYb 5LkM+6X0G3SwViz8yqEmuF7Rtd0sXeP2x2wKUA9Uxe8awqtnjceyviHKBjizqADcKgJY OFcg== X-Gm-Message-State: AJcUukdgk9GWy34Pp0Nvgr/IALjErsM8QgouEMiIS82J/OIwZnhSSa0s RA+FvbhUQGgs3IGEqFbHzRcwB/CrZ14= X-Google-Smtp-Source: ALg8bN72udqCw12ARRUlsMNZKMBSx//LN7duhJCB6xuyA2fxwxlbZf2f3QzguI6oEK40TUOi9s4AsQ== X-Received: by 2002:a63:304:: with SMTP id 4mr3164016pgd.99.1547808754884; Fri, 18 Jan 2019 02:52:34 -0800 (PST) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id m19sm10792623pgn.35.2019.01.18.02.52.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 02:52:33 -0800 (PST) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Fri, 18 Jan 2019 03:52:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 12400 Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.177 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) close 12400 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 18:59:49 2019 Received: (at submit) by debbugs.gnu.org; 5 Feb 2019 23:59:49 +0000 Received: from localhost ([127.0.0.1]:33886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grAd3-00025b-7X for submit@debbugs.gnu.org; Tue, 05 Feb 2019 18:59:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grAd1-00025N-3e for submit@debbugs.gnu.org; Tue, 05 Feb 2019 18:59:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:41772) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grAcu-0008VM-PB for submit@debbugs.gnu.org; Tue, 05 Feb 2019 18:59:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grAct-0000HG-S4 for bug-coreutils@gnu.org; Tue, 05 Feb 2019 18:59:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grAcr-0008T9-VD for bug-coreutils@gnu.org; Tue, 05 Feb 2019 18:59:39 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:52850 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grAcq-0008Mi-8O for bug-coreutils@gnu.org; Tue, 05 Feb 2019 18:59:37 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x15NxS2l097258; Tue, 5 Feb 2019 15:59:30 -0800 Message-ID: <5C5A2360.5070104@tlinx.org> Date: Tue, 05 Feb 2019 15:59:28 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Assaf Gordon Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> In-Reply-To: <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: Coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 1/18/2019 12:32 AM, Assaf Gordon wrote: > retitle 12400 rmdir: add --one-file-system option > severity 12400 wishlist > tags 12400 wontfix > stop > >> If you want a recursive option why not use 'rm -rf'? >> ----- rmdir already provides a recursive delete that can cross file system boundaries dir1->dir2->dir3 dir1 is on 1 file system, dir 2 is on another and dir 3 can be on another. >> There is always 'find' with the -delete option. But regardless there >> has been the find -exec option. >> ---- true -- so why should 'rm' protect against crossing boundaries deleting '/' or everything under '.' when there is find? find is the obvious solution you are saying, so all that checking in rm should be removed, as it is inconsistent with rmdir that can cross boundaries. As for closing something not addressed for 6 years while the problem has grown worse -- (rmdir didnt' used to have a recursive delete), doesn't seem a great way to judge whether or not a bug is valid or not . From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 10 16:52:33 2019 Received: (at 12400) by debbugs.gnu.org; 10 Feb 2019 21:52:33 +0000 Received: from localhost ([127.0.0.1]:42891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsx1d-0000NJ-3T for submit@debbugs.gnu.org; Sun, 10 Feb 2019 16:52:33 -0500 Received: from havoc.proulx.com ([96.88.95.61]:52479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsx1b-0000N3-EO for 12400@debbugs.gnu.org; Sun, 10 Feb 2019 16:52:32 -0500 Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id 7F84E770; Sun, 10 Feb 2019 14:52:25 -0700 (MST) Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 3ACE321174; Sun, 10 Feb 2019 14:52:25 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 32A3B2DC80; Sun, 10 Feb 2019 14:52:24 -0700 (MST) Date: Sun, 10 Feb 2019 14:52:24 -0700 From: Bob Proulx To: L A Walsh , 12400@debbugs.gnu.org Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... Message-ID: <20190210141142903492049@bob.proulx.com> References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> <5C5A2360.5070104@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5C5A2360.5070104@tlinx.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) L A Walsh wrote: > >> If you want a recursive option why not use 'rm -rf'? > > rmdir already provides a recursive delete that can cross > file system boundaries Please provide an example. Something small. Something concrete. Please include the version of rmdir. Something like: mkdir testdir testdir/dir1 testdir/dir2 testdir/dir2/dir3 rmdir --recursive testdir/dir2 rmdir --version Include all input and output verbatim. For clarity do not use shell file glob wildcards because that is a dependence upon a specific command line shell and the shell's configuration. > dir1->dir2->dir3 > > dir1 is on 1 file system, dir 2 is on another and dir 3 can be on another. GNU Coreutils rmdir does not provide a recursive delete option. Therefore one can only assume that the rmdir you are referring to is a different rmdir from a different project. I specifically asked if you were using the rmdir --parents option but my message was the only mention of --parents in this entire ticket and in subsequent responses your messages also did not mention it. Therefore I can only assume that there is no --parents option being used here. > >> There is always 'find' with the -delete option. But regardless there > >> has been the find -exec option. > > true -- so why should 'rm' protect against crossing boundaries > deleting '/' or everything under '.' when there is find? > > find is the obvious solution you are saying, so all that checking in > rm should be removed, as it is inconsistent with rmdir that can > cross boundaries. My mention of 'find' was really a simple statement about alternatives when programmatic needs are desired. Because 'find' is the swiss army chainsaw for directory traversal. I didn't mean to derail the discussion there. But if it is to be derailed then 'find' is the best choice when needing a specific set of programmatic requirements for directory traversal. The other utilities that have simpler capabilities are the distractions. But in theory this bug ticket was about 'rmdir'. > As for closing something not addressed for 6 years while the problem > has grown worse -- (rmdir didnt' used to have a recursive delete), doesn't > seem a great way to judge whether or not a bug is valid or not . GNU Coreutils rmdir does not provide a recursive delete option. This bug report so far has contained conflicting complaints to the point that it has not been useful. It still is not clear if you are complaining about 'rmdir' or 'rm' even after requests for clarification. Or possibly your shell's ** file glob expansion. Probably some combination of them all that is unique to your environment. To be useful a bug report must be descriptive so that the reader can understand it. If the reader can't understand it then how can it be useful? The report must be as simple as possible. Because extraneous complexity is distracting. Stay focused on the bug being reported and not about other unrelated things. Bugs about behavior should be reproducible with a test case. Because nothing is as useful as a concrete example. I have reviewed the reports in this ticket and there seems to be no viable bug report to operate upon here. At some point without a test case it only makes sense to say enough is enough and move on since this does not appear to be a bug in any program of the coreutils project. However even though a bug is closed discussion may continue as we are doing here. The bug state is simply a way to organize reports for the purposes of triage. Many thanks to Assaf for putting in the work to triage these old bug tickets. If you wish to report a bug in rmdir's recursive delete option then we must insist on a test case. Bob From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 10 20:42:18 2019 Received: (at submit) by debbugs.gnu.org; 11 Feb 2019 01:42:18 +0000 Received: from localhost ([127.0.0.1]:42983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt0by-0005z1-J3 for submit@debbugs.gnu.org; Sun, 10 Feb 2019 20:42:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt0bw-0005yp-LO for submit@debbugs.gnu.org; Sun, 10 Feb 2019 20:42:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:50090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt0br-0003XW-El for submit@debbugs.gnu.org; Sun, 10 Feb 2019 20:42:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gt0bq-0001bX-NW for bug-coreutils@gnu.org; Sun, 10 Feb 2019 20:42:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gt0SE-0004zt-Qg for bug-coreutils@gnu.org; Sun, 10 Feb 2019 20:32:15 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:33586 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt0SE-0004z3-Hn for bug-coreutils@gnu.org; Sun, 10 Feb 2019 20:32:14 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x1B1W8o4049653; Sun, 10 Feb 2019 17:32:11 -0800 Message-ID: <5C60D098.5040800@tlinx.org> Date: Sun, 10 Feb 2019 17:32:08 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Bob Proulx , Coreutils Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> <5C5A2360.5070104@tlinx.org> <20190210141142903492049@bob.proulx.com> In-Reply-To: <20190210141142903492049@bob.proulx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2/10/2019 1:52 PM, Bob Proulx wrote: > L A Walsh wrote: >>>> If you want a recursive option why not use 'rm -rf'? >> rmdir already provides a recursive delete that can cross >> file system boundaries > > Please provide an example. Something small. Something concrete. > Please include the version of rmdir. The original bug stems from having to use wild cards to delete all files in a directory instead of '.', as in being told to use: rm -fr --one-filesystem foo/* instead of rm -fr --one-filesystem foo/. or cd foo && rm -fr --one-filesystem . The recommended solution to use foo/* won't stay on 1 file system, while an alternative using '.' would. if I use rm --one-filesystem a b c, I could be deleting files off of 3 file systems. Why would the argument be named 'one-filesystem' if there as no way to ensure that all files were only on 1 file system? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 11 05:57:25 2019 Received: (at submit) by debbugs.gnu.org; 11 Feb 2019 10:57:25 +0000 Received: from localhost ([127.0.0.1]:43190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9HB-0004VW-AH for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:57:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gt9H9-0004VJ-Df for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:57:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:38942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt9H4-0004od-2J for submit@debbugs.gnu.org; Mon, 11 Feb 2019 05:57:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gt9H2-0007bu-QP for bug-coreutils@gnu.org; Mon, 11 Feb 2019 05:57:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gt9H1-0004nx-Gc for bug-coreutils@gnu.org; Mon, 11 Feb 2019 05:57:16 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:47506 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gt9H0-0004mk-W1 for bug-coreutils@gnu.org; Mon, 11 Feb 2019 05:57:15 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x1BAv9V5002637; Mon, 11 Feb 2019 02:57:12 -0800 Message-ID: <5C615505.3010002@tlinx.org> Date: Mon, 11 Feb 2019 02:57:09 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Bob Proulx , Coreutils Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> <5C5A2360.5070104@tlinx.org> <20190210141142903492049@bob.proulx.com> In-Reply-To: <20190210141142903492049@bob.proulx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2/10/2019 1:52 PM, Bob Proulx wrote: > L A Walsh wrote: >>>> If you want a recursive option why not use 'rm -rf'? >> rmdir already provides a recursive delete that can cross >> file system boundaries > > Please provide an example. Something small. Something concrete. > Please include the version of rmdir. ---- As near as I can tell the rmdir case derives from the similar case (assuming -x as shorthand for --onefilesystem), under 'rm -frx foo/*' or 'cd foo && rm -frx *' that was suggested as a replacement for the desired rm -frx foo/. or 'cd foo && rm -frx .' The first two forms of rm using '*' have no limit on the number of file systems that can be affected. Only the form 'foo/.' or '.' when used with --one-filesystem will be actually limited to one-file-system. If rmdir ever had a related but (now can have more so with -p), it could also affect multiple dirs with 'rmdir foo/*' Now you can't claim '*' is a somehow disallowed as it was suggested as a workaround for disallowing rm -frx foo/. But any form with 'rm' or rmdir can unsafely affect multiple file systems on multiple systems, as users are told to use shell-wildcards to make up for being unable to specify the top level inside dir for deletion. The reason things proably got so chaotic is that when it as suggested that '*' be used with rm -frx *, one-filesystem was no longer just 1 file system. 1) pray tell, why would it be called one file system when its not? Now it's one-filesystem / root arg? Uh huh. That sounds more than a bit specious to me. 2) if 'rm' really limited its deletes to 1 file system (ensuring all it's cmd line args were on the same file system, Then the same feature can be applied to rmdir to prevent it going from touching different file systems in 1 command. Of couse with -p as it back tracks, each back track and imply a change of file system. I can't find the original posts, but early comments applied to 'rm'. Some people seem to change titles of bugs without really understanding what the root bug was about, so the fact that something has rmdir in the title now doesn't really mean the original was about rmdir. Might want to examine that policy so things won't get as confusing -- adding on to a title in a separate field (gnu-summary), seems like it might be less consusing that changing the original title. That's my best guess at what this is about, but trying to recall details where my original didn't seem to get posted back to me (I thought it did, maybe things have chnaged in 6 years?). -l Since to delete all files under a directory with something like (assuming '-x' for '--one-filesystem') rm -frx * or rmdir * can all delete things on multiple file systems. Note, multiple responders, in discussing rm -frx > > Something like: > > mkdir testdir testdir/dir1 testdir/dir2 testdir/dir2/dir3 > rmdir --recursive testdir/dir2 > rmdir --version > > Include all input and output verbatim. For clarity do not use shell > file glob wildcards because that is a dependence upon a specific > command line shell and the shell's configuration. > >> dir1->dir2->dir3 >> >> dir1 is on 1 file system, dir 2 is on another and dir 3 can be on another. > > GNU Coreutils rmdir does not provide a recursive delete option. > Therefore one can only assume that the rmdir you are referring to is a > different rmdir from a different project. > > I specifically asked if you were using the rmdir --parents option but > my message was the only mention of --parents in this entire ticket and > in subsequent responses your messages also did not mention it. > Therefore I can only assume that there is no --parents option being > used here. > >>>> There is always 'find' with the -delete option. But regardless there >>>> has been the find -exec option. >> true -- so why should 'rm' protect against crossing boundaries >> deleting '/' or everything under '.' when there is find? >> >> find is the obvious solution you are saying, so all that checking in >> rm should be removed, as it is inconsistent with rmdir that can >> cross boundaries. > > My mention of 'find' was really a simple statement about alternatives > when programmatic needs are desired. Because 'find' is the swiss army > chainsaw for directory traversal. I didn't mean to derail the > discussion there. But if it is to be derailed then 'find' is the best > choice when needing a specific set of programmatic requirements for > directory traversal. The other utilities that have simpler > capabilities are the distractions. But in theory this bug ticket was > about 'rmdir'. > >> As for closing something not addressed for 6 years while the problem >> has grown worse -- (rmdir didnt' used to have a recursive delete), doesn't >> seem a great way to judge whether or not a bug is valid or not . > > GNU Coreutils rmdir does not provide a recursive delete option. > > This bug report so far has contained conflicting complaints to the > point that it has not been useful. It still is not clear if you are > complaining about 'rmdir' or 'rm' even after requests for > clarification. Or possibly your shell's ** file glob expansion. > Probably some combination of them all that is unique to your > environment. > > To be useful a bug report must be descriptive so that the reader can > understand it. If the reader can't understand it then how can it be > useful? The report must be as simple as possible. Because extraneous > complexity is distracting. Stay focused on the bug being reported and > not about other unrelated things. Bugs about behavior should be > reproducible with a test case. Because nothing is as useful as a > concrete example. > > I have reviewed the reports in this ticket and there seems to be no > viable bug report to operate upon here. At some point without a test > case it only makes sense to say enough is enough and move on since > this does not appear to be a bug in any program of the coreutils > project. However even though a bug is closed discussion may continue > as we are doing here. The bug state is simply a way to organize > reports for the purposes of triage. Many thanks to Assaf for putting > in the work to triage these old bug tickets. > > If you wish to report a bug in rmdir's recursive delete option then we > must insist on a test case. > > Bob From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 26 15:10:33 2019 Received: (at 12400) by debbugs.gnu.org; 26 Feb 2019 20:10:33 +0000 Received: from localhost ([127.0.0.1]:53311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyj3h-0004lp-4K for submit@debbugs.gnu.org; Tue, 26 Feb 2019 15:10:33 -0500 Received: from havoc.proulx.com ([96.88.95.61]:50784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyj3f-0004lb-7H for 12400@debbugs.gnu.org; Tue, 26 Feb 2019 15:10:31 -0500 Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id E61B842D; Tue, 26 Feb 2019 13:10:24 -0700 (MST) Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id A88E02125A; Tue, 26 Feb 2019 13:10:24 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 9BE462DC7C; Tue, 26 Feb 2019 13:10:24 -0700 (MST) Date: Tue, 26 Feb 2019 13:10:24 -0700 From: Bob Proulx To: L A Walsh Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... Message-ID: <20190226125735639122196@bob.proulx.com> References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> <5C5A2360.5070104@tlinx.org> <20190210141142903492049@bob.proulx.com> <5C60D098.5040800@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5C60D098.5040800@tlinx.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) L A Walsh wrote: > Bob Proulx wrote: > > Please provide an example. Something small. Something concrete. > > Please include the version of rmdir. > > The original bug stems from having to use wild cards to delete > all files in a directory instead of '.', as in being told to use: > > rm -fr --one-filesystem foo/* When reporting bugs in command line utilities it is good to avoid using file glob wildcards in the test case. Because that involves the shell. Because that makes the test case dependent upon the contents of the directory which will then be expanded by the shell. > instead of > > rm -fr --one-filesystem foo/. or > cd foo && rm -fr --one-filesystem . rm: refusing to remove '.' or '..' directory: skipping '.' I agree with your complaint about "rm -rf ." not working. That is an annoying nanny-state restriction. It should fail removing '.' after having removed all it can remove. And it only took 16 messages in order to get to this root cause! It would have been so much easier if you had started there. But this report is about rmdir so let's get back to rmdir. Any reports about rm should be in a separate ticket. Mixing multiple bugs in any one bug ticket is confusing and bad. Bob From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 26 15:34:50 2019 Received: (at 12400) by debbugs.gnu.org; 26 Feb 2019 20:34:50 +0000 Received: from localhost ([127.0.0.1]:53317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyjRC-0005Sc-5n for submit@debbugs.gnu.org; Tue, 26 Feb 2019 15:34:50 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:49802 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyjR9-0005SS-TV for 12400@debbugs.gnu.org; Tue, 26 Feb 2019 15:34:48 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x1QKYhn9092961; Tue, 26 Feb 2019 12:34:45 -0800 Message-ID: <5C75A2B8.4010902@tlinx.org> Date: Tue, 26 Feb 2019 12:34:00 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: Bob Proulx Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)... References: <504D34D0.2050607@tlinx.org> <20120910052231.GB2709@hysteria.proulx.com> <5c6007e4-43d1-0905-4061-cc695545ddc1@gmail.com> <5C5A2360.5070104@tlinx.org> <20190210141142903492049@bob.proulx.com> <5C60D098.5040800@tlinx.org> <20190226125735639122196@bob.proulx.com> In-Reply-To: <20190226125735639122196@bob.proulx.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12400 Cc: 12400@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2/26/2019 12:10 PM, Bob Proulx wrote: >> rm -fr --one-filesystem foo/. or >> cd foo && rm -fr --one-filesystem . > > rm: refusing to remove '.' or '..' directory: skipping '.' > > I agree with your complaint about "rm -rf ." not working. That is an > annoying nanny-state restriction. It should fail removing '.' after > having removed all it can remove. And it only took 16 messages in > order to get to this root cause! It would have been so much easier if > you had started there. > > But this report is about rmdir so let's get back to rmdir. Any > reports about rm should be in a separate ticket. Mixing multiple bugs > in any one bug ticket is confusing and bad. --- I think your example is where things started. The issue with rmdir is a follow-on problem for not having a "-x" option (don't delete from more than 1 file system), and I recognized that from the fact that rm -fr no longer has the ability to stay on 1 file system. The only way you can delete files from under "." with 'rm', and I have been told this NUMEROUS TIMES, is to use the shell's expansion. While I would agree one should remove the shell's expansion from the effects of a tool when writing a bug report, the oft-quoted solution to rm -fr . not following the original design, was to use rm -fr *. With rm -fr *, rm no longer can delete files just on 1-filesystem, let alone the 1 file system that the top of the tree "." is on. If all subdirs underneath "." (arbitrary directory as used in "rm -fr ."), are on different file systems, as all are different mount points, then there is no fixed limit as to how many file systems it will affect. Then people will say to use the find command -- which instantly makes 'rm' worthless for the job for which it was intended. If people want nanny behavior, like rm -i or even rm -I, let them alias it that way. My main issue is one can't delete all files under a directory with 'rm' anymore. I've asked for it to only refuse to do so if POSIX_CORRECTLY is set, or to add the converse IGNORE_POSIX_DOT_RESRICTIONS (keeping the one for '/' -- as there is no reason to ever delete '/' -- it's inefficient -- just remake the file system). But as 'rm' was first designed, it did a depth first removal and didn't preprocess the path looking for reasons to stop. And I HAVE submitted multiple attemps to get rm-fr. to work again. They are continuously shot down such that I often have my own version of 'rm' that also removes empty directories (behaving like 'rmdir'). It can't remove '.' because it is in the dir and doesn't know the name to remove from the parent, so that's still not affected. If people have issues with rm having these changes, then I have no problem adding 'r' as a new util that does --that would not be bound by restrictions on 'rm', it would 1) allow "rm -fr .", deleting all but the current directory and issue no error message due to the "-f". and 2) delete empty directories without '-r' -- but only if it knows their name -- i.e. it wouldn't delete '.'. As it stands, the only reason this bug was filed was because it's behavior is inconsistent with what is implemented in rm in that it has no option to stay on 1 file system (which no longer works in 'rm' due to previously cited reasons). Creating such a utility would be trivial -- modify 'rm' to allow processing the dirtree below "." and allow it to process an empty directory. So where would you suggest going from here to get to 'there'? Linda From unknown Fri Sep 05 15:37:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 Mar 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator