[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #22646] RFE: -I option for rm: prompt once on directories
From: |
anonymous |
Subject: |
[bug #22646] RFE: -I option for rm: prompt once on directories |
Date: |
Mon, 17 Mar 2008 22:16:05 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20061201 Firefox/2.0.0.12 (Ubuntu-feisty) |
URL:
<http://savannah.gnu.org/bugs/?22646>
Summary: RFE: -I option for rm: prompt once on directories
Project: GNU Core Utilities
Submitted by: None
Submitted on: Monday 17/03/08 at 22:16 UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When using "rm -ir *", it can get pretty tedious confirming once for every
file, within directories. However, I prefer not to skip the safety-belt
entirely by abandoning the -i.
I propose adding a new flag, -I, which behaves in the same way as -i, except
that directories are only confirmed once for the whole directory.
Current behaviour:
[~/temp]$ touch a b ; mkdir c ; touch c/{d,e,f,g,h}
[~/temp]$ rm -ir *
rm: remove regular empty file `a'? y
rm: remove regular empty file `b'? y
rm: descend into directory `c'? y
rm: remove regular empty file `c/d'? y
rm: remove regular empty file `c/e'? y
rm: remove regular empty file `c/f'? y
rm: remove regular empty file `c/g'? y
rm: remove regular empty file `c/h'? y
rm: remove directory `c'? y
[~/temp]$
Proposed behaviour:
[~/temp]$ touch a b ; mkdir c ; touch c/{d,e,f,g,h}
[~/temp]$ rm -Ir *
rm: remove regular empty file `a'? y
rm: remove regular empty file `b'? y
rm: remove directory `c' and all its contents? y
[~/temp]$
Personally, I'd then change my .bashrc from "alias rm='rm -i'" to "alias
rm='rm -I', though I do realise that this is controversial ;-)
Just an idea - hope you like it. Thanks for all your work on GNU - much
appreciated! - Richard
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?22646>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #22646] RFE: -I option for rm: prompt once on directories,
anonymous <=