Friday, February 22, 2008

Delete all emacs backup-files under linux

Do you ever use emacs on linux? In that case you most certainly have noticed that it creates backup files for you (filenames ending in ~).

Backups are great, but sometimes you don't want them cluttering your directories. What if you could remove them with a single command line? Well you can. The following line will remove all files ending in ~ from your current directory and all subdirectories.

$ find ./ -name '*~' -exec rm '{}' \; -print -or -name ".*~" -exec rm {} \; -print

More here: AnyExample.com

No comments: