Bug 145564 - rm removes directories by default
rm removes directories by default
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  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:
Last Closed: 2005-01-19 15:36:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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)

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

       rm [OPTION]... FILE...

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

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

How reproducible:

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

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.