Bug 145564 - rm removes directories by default
rm removes directories by default
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-19 14:31 EST by Mike
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-01-19 15:36:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mike 2005-01-19 14:31:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041020

Description of problem:
From the "rm" man page:

==================
SYNOPSIS
       rm [OPTION]... FILE...

DESCRIPTION
This  manual  page documents the GNU version of rm.  rm removes each
specified file.  By default, it does not remove directories.
===================

but in acutal practice it happily removes directories as follows:

$ mkdir dir1
$ mkdir dir2
$ mkdir dir3
$ touch dir1/file1
$ touch dir2/file1
$ touch dir3/file1
$ rm -rv *
removed `dir1/file1'
removed directory: `dir1'
removed `dir2/file1'
removed directory: `dir2'
removed `dir3/file1'
removed directory: `dir3'

$ alias
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot
--show-tilde'



Version-Release number of selected component (if applicable):
coreutils-5.2.1-31

How reproducible:
Always

Steps to Reproduce:
1.build tree of files/directories
2.issue "rm -r *"
3.
    

Actual Results:  directories are removed

Expected Results:  files should be removed but directoies shouldn't
according to the documentation.

Additional info:
Comment 1 Mike 2005-01-19 15:36:01 EST
Nevermind, my concern seems to be a brain fart on my part.

Regards, Mike Klinke

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