This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 473662 - rm -d broken
rm -d broken
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: coreutils (Show other bugs)
4.8
All Linux
medium Severity low
: rc
: ---
Assigned To: Ondrej Vasik
BaseOS QE
:
Depends On: 473472
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-29 15:25 EST by Ondrej Vasik
Modified: 2009-05-18 16:07 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 546503 (view as bug list)
Environment:
Last Closed: 2009-05-18 16:07:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondrej Vasik 2008-11-29 15:25:13 EST
Cloning that bugzilla as -d is noop in coreutils-5.2.1 and it could easily confuse users from usage -rf option.

+++ This bug was initially created as a clone of Bug #473472 +++

Description of problem:


Version-Release number of selected component (if applicable):
coreutils-5.2.1-32.el4

How reproducible:
always

Steps to Reproduce:
1. mkdir /tmp/abc
2. rm -d /tmp/abc
3. output complains it's a directory but man page says rm -d should remove a directory.
  
Actual results:
rm: cannot remove `abc': Is a directory


Expected results:
dir should be removed. also tried as root, same problem.

Additional info:

--- Additional comment from ovasik@redhat.com on 2008-11-28 14:11:30 EDT ---

Thanks for report. Now the option -d is deprecated in upstream coreutils - with comment:
/* Ignore this option, for backward compatibility with
   coreutils 5.92.  FIXME: Some time after 2005, change this
   to report an error (or perhaps behave like FreeBSD does)
   instead of ignoring the option.  */

This option seems to be not working at all in RHEL-4/RHEL-5 coreutils, as it only activates boolean which is unused in the sourcecode. Activation boolean was removed from remove.c by http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=fb205872c1038139e118022014db0d6d817c34ec
in June 2002, coreutils-5.2.1 (RHEL-4) are releasad in March 2004.

You should use -rf for removing non-empty directories, the best solution for that bugzilla would be to remove that confusing option from the help, man and info page as it is noop.

--- Additional comment from juanino@yahoo.com on 2008-11-29 14:31:51 EDT ---

Since it's the first option in the man page, removing it from future versions would be a great help.  I am servicing end users from another operating system and they were using the man pages heavily so they didn't read past the first option for removing a directory to see rm -rf.  Thanks.
Comment 7 errata-xmlrpc 2009-05-18 16:07:21 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0959.html

Note You need to log in before you can comment on or make changes to this bug.