Debian Bug report logs - #537106
coreutils: Allow rm <nothing> or rm -q

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <[email protected]>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: Ryo Furue <[email protected]>

Date: Wed, 15 Jul 2009 03:21:02 UTC

Severity: wishlist

Found in version coreutils/7.4-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Ryo Furue <[email protected]>, Michael Stone <[email protected]>:
Bug#537106; Package coreutils. (Wed, 15 Jul 2009 03:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ryo Furue <[email protected]>:
New Bug report received and forwarded. Copy sent to Ryo Furue <[email protected]>, Michael Stone <[email protected]>. (Wed, 15 Jul 2009 03:21:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Ryo Furue <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: coreutils: Allow rm <nothing> or rm -q
Date: Tue, 14 Jul 2009 17:20:23 -1000 (HST)
Package: coreutils
Version: 7.4-2
Severity: wishlist

I wish rm remained silent when it is given no argument.  Currently, it
complains and returns 1:

  $ rm
  rm: missing operand
  Try `rm --help' for more information.
  $ echo $?
  1
  $

Doing nothing is the most natural boundary condition:

  $ rm this that # removes this and that
  $ rm this      # removes this
  $ rm           # removes nothing

and is convenient in scripting; for example

  # This is a Makefile
  clean:
          rm ($wildcard *.o)

If this proposed modification isn't feasible, I wish rm had a
"--quiet" option instead:

  $ rm -q  # does nothing; returns 0.

Currently, "-f" is often used to suppress errors

  # This is a Makefile
  clean:
          rm -f ($wildcard *.o)

but this has an undesirable side effect of unwittingly removing
readonly files.

Best regards,
Ryo

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.47-2   Access control list shared library
ii  libattr1                      1:2.4.43-3 Extended attribute shared library
ii  libc6                         2.9-12     GNU C Library: Shared libraries
ii  libselinux1                   2.0.82-1   SELinux shared libraries

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 09:17:26 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.