Bug 145564

Summary: rm removes directories by default
Product: [Fedora] Fedora Reporter: Mike <lsomike>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
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:

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