coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a smarter rm


From: Diggory Hardy
Subject: a smarter rm
Date: Tue, 23 Apr 2013 09:52:36 +0200
User-agent: KMail/4.10.2 (Linux/3.5.0-27-generic; KDE/4.10.2; x86_64; ; )

Dear list,

I have been playing with some changes in behaviour to make 'rm' smarter / 
friendlier. (See my_rm in [1] for an implementation.)

[1]: https://github.com/dhardy/scripts "my_rm"

I'm not quite sure if I dare suggest changes in the behaviour of such a 
standard and long-existing tool, but adding a -s ("smart") option (or possibly 
adjusting the -i behaviour) to do the following really seems to make it nicer 
to use:

1. Don't prompt about actions which can easily be undone (assuming an "ls -l" 
before hand): delete symbolic links and empty directories without question.
2. Prompt before other actions (deleting files or recursively deleting 
directories)
3. Don't require rewriting (using rmdir or -rf)

Thoughts? Can a small improvement which shouldn't affect most scripts win out 
over tradition?

Please CC me, I'm not on the list.

Diggory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]