Mvbackupfiles - a script to "delete" back autosaved backup files
24 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
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