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


 

Mvbackupfiles - a script to "delete" back autosaved backup files


24th of November 2005

Last month I complained about how brutal the rm program in Linux was and how I cocked things up when I wanted to remove the autosaved backup files that jed creates. Here's the solution...

I created a script in ~/bin/Mvbackupfiles that looks like this:

 #!/bin/sh
 mv -v *~ /tmp

Now, whenever I want to clear a directory of all files like dummy.py~ or README.txt~, I just run Mvbackupfiles and I become a much happier and tidier person.

Here's what it can look like:

 peterbe@trillian:~/dev/signature_hider $ ls
 index.html  index.html~
 peterbe@trillian:~/dev/signature_hider $ Mvbackupfiles 
 `index.html~' -> `/tmp/index.html~'
 peterbe@trillian:~/dev/signature_hider $ ls
 index.html



Comment

Sascha Welter - 24th November 2005  [«« Reply to this]
Isn't there a setting to put those backup files into /tmp in the first place?
 
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.