GNU bug report logs -
#7985
Inconsistancy
Previous Next
Reported by: Tom Tijerina <swonsay <at> gmail.com>
Date: Fri, 4 Feb 2011 21:26:01 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7985 in the body.
You can then email your comments to 7985 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7985
; Package
coreutils
.
(Fri, 04 Feb 2011 21:26:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tijerina <swonsay <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 04 Feb 2011 21:26:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I have a friend I'm trying to get into learning Linux, not wanting to
hand feed him every command I've instructed him to use man when he get
stuck or needs help on how to use a command.
He ran man rm and it says at the top its for removing files OR
directories. That is not correct as it does not give you any information
for removing directories. I assumed it may be an option of some sort but
I have not found it in the man page. Is this an oversight?
------------------
RM(1) User Commands
RM(1)
NAME
rm - remove files or directories
If this is something positive credit should be given to Ron Flowers. He
is the one who pointed it out to me.
Running Debian Lenny, GNU coreutils 8.5
Thanks.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7985
; Package
coreutils
.
(Fri, 04 Feb 2011 21:44:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 7985 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 02/03/2011 04:22 PM, Tom Tijerina wrote:
> I have a friend I'm trying to get into learning Linux, not wanting to
> hand feed him every command I've instructed him to use man when he get
> stuck or needs help on how to use a command.
>
> He ran man rm and it says at the top its for removing files OR
> directories. That is not correct as it does not give you any information
> for removing directories. I assumed it may be an option of some sort but
> I have not found it in the man page. Is this an oversight?
Thanks for the report, however, the sentence is correct as-is.
$ mkdir dir
$ rm -r dir
successfully removes the directory dir.
The -r option already has this text:
-r, -R, --recursive remove directories and their contents recursively
About the only thing that might be worth doing is rewording from one
accurate sentence to another, but I don't know of anything better than
this, and prefer the terseness of the original sentence (man pages are
generated from the --help output, and --help should be a complete
overview while still being concise):
rm - remove files or directory hierarchies
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Fri, 04 Feb 2011 21:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tom Tijerina <swonsay <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 04 Feb 2011 21:47:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 7985-done <at> debbugs.gnu.org (full text, mbox):
On 03/02/11 23:22, Tom Tijerina wrote:
> I have a friend I'm trying to get into learning Linux, not wanting to
> hand feed him every command I've instructed him to use man when he get
> stuck or needs help on how to use a command.
>
> He ran man rm and it says at the top its for removing files OR
> directories. That is not correct as it does not give you any information
> for removing directories. I assumed it may be an option of some sort but
> I have not found it in the man page. Is this an oversight?
$ rm --help | grep directories
-r, -R, --recursive remove directories and their contents recursively
By default, rm does not remove directories. Use the --recursive (-r or -R)
Also the man page is automatically generated from --help output.
cheers,
Pádraig.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7985
; Package
coreutils
.
(Fri, 04 Feb 2011 22:01:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 7985 <at> debbugs.gnu.org (full text, mbox):
Tom Tijerina wrote:
> He ran man rm and it says at the top its for removing files OR
> directories. That is not correct as it does not give you any information
> for removing directories. I assumed it may be an option of some sort but
> I have not found it in the man page. Is this an oversight?
Of course the full documentation is available in the info pages. You
would be helping your friend out quite a bit if you gave him
instruction in accessing the info pages which tend to be more useful.
As to the man page the man page says:
DESCRIPTION
This manual page documents the GNU version of rm. rm removes each
specified file. By default, it does not remove directories.
So you are correct that by default rm will not remove a directory.
$ mkdir testdir
$ rm testdir
rm: cannot remove `testdir': Is a directory
The man page then goes on to list the options.
OPTIONS
...
-r, -R, --recursive
remove directories and their contents recursively
There is the information you missed. The rm command will remove
directories recursively when the -r option has been added.
$ mkdir -p testdir
$ ls -ldog testdir
drwxrwxr-x 2 4096 Feb 4 14:55 testdir
$ rm -r testdir
$ ls -ldog testdir
ls: cannot access testdir: No such file or directory
$
So it appears to me that the command and the documentation for it are
there. I think you just missed seeing it. Most GNU/Unix users are so
accustomed to useing 'rm -rf somethingsomething' that we don't often
look at the documentation for it anymore. But I believe it is there
okay just the same. :-)
For completeness here is the online standards documentation.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/rm.html
The -r option goes way back to the original Unix rm command forty
years ago.
> If this is something positive credit should be given to Ron Flowers. He
> is the one who pointed it out to me.
You are building good karma by passing along the credit! Good job.
> Running Debian Lenny, GNU coreutils 8.5
Hmm... Not to cause a distraction here since it is completely
irrelevant but Lenny uses version 6.10 and Squeeze/Sid is 8.5 with the
expectation that Squeeze will release this weekend. And then Sid will
upgrade to 8.10 which was released just today. I think you crossed
your wires! :-)
Bob
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#7985
; Package
coreutils
.
(Fri, 04 Feb 2011 22:30:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 7985 <at> debbugs.gnu.org (full text, mbox):
Thank you for your replies guys, I'm sorry we both managed to miss it.
The wording is a bit on the odd side but it is fine the way it is.
Sorry I wasted your time and thanks for making this wonderful system
work on such a consistent basis. I wouldn't know how to operate with a
buggy commercial OS at this point.
Tom
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 05 Mar 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 111 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.