GNU bug report logs - #12400
rmdir: add --one-file-system option

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Mon, 10 Sep 2012 00:32:01 UTC

Severity: wishlist

Tags: wontfix

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #67 received at 12400 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: 12400 <at> debbugs.gnu.org
Subject: Re: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has
 no option to stay on 1 file system)...
Date: Tue, 26 Feb 2019 13:10:24 -0700
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




This bug report was last modified 6 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.