Crosstips.org

My fun Crossword solver project. Crosstips.org & Krysstips.se

Kung Fu

Fujian White Crane Kung Fu

Fry-IT

Fry-IT is the company I work for

Photos

Photoalbum, both old and new.

Zope

What I have and am doing with Zope

Receptsamlingen

In Swedish only. About my "Collection of Recipes" website.

Contact me

My contact details and how to contact me.

 

KungFuPeople.com
Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com


Mobile version of this page Mobile version of this page


 

Furious and deprived by 'rm *'


rm, deleted, ~/bin, trash

15th of October 2005

In years I haven't accidentally deleted important stuff with rm * when what I mean is rm *~ to delete backup files, until...

Yesterday I accidentally deleted all templates for a work project when I wanted to delete the backup files which look like this foo.zpt~. In the haste I did:

 $ rm *

When I meant:

 $ rm *~

Today I did it again. I didn't want any backup files in my ~/bin directory which just screws up tab completion. Again, in the haste I accidentally deleted all my bin scripts :( Most of it recoverable or easily rewritable but still a f**ing nuisance. What to do? Do people have any good suggestions to make the rm work more like the Trash can does on the desktop?



Comment

Emil Erlandsson - 16th October 2005  [«« Reply to this]
Add an alias in your shell config (if it supports aliases that is) so that 'rm' always asks you before any deletion. You can always override with -f if you don't want to answer any questions ...

alias rm='rm -i'

-i, --interactive prompt before any removal
Sascha Welter - 17th October 2005  [«« Reply to this]
Instruct your editor to put those backup files in the system tmp directory, set up your system to clean up there with the "daily" cron job. Everything that gets you to routinely type dangerous stuff should be eliminated.
 
Name:
Email:
hide my email address.

Your email address will be encoded to prevent email-extraction spiders from reading it so you won't get spammed if you decide to show your email address.