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

24 November 2005   1 comment   Linux

Mind That Age!

This blog post is 13 years old! Most likely, its content is outdated. Especially if it's technical.

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

Comments

Sascha Welter
Isn't there a setting to put those backup files into /tmp in the first place?
Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
createElement('a') with a javascript href 21 November 2005
Next:
Islington Knuckle Walk 24 November 2005
Related by Keyword:
Local jed settings 19 April 2013
Wing IDE versus Jed 11 December 2008
File check before delete 07 March 2008
Geeking with tags file for Jed 29 May 2006
Jed Tags with ntags (for dummies) 11 February 2006
Related by Text:
HTML Tree on Hacker News 18 May 2014
YouTube - Nigella's XXXmas 19 December 2008
How and why to use django-mongokit (aka. Django to MongoDB) 08 March 2010
How to track Google Analytics pageviews on non-web requests (with Python) 03 May 2016
hashin 0.7.0 and multiple packages 30 August 2016