Skip to content

Instantly share code, notes, and snippets.

@rohannog
Created November 5, 2011 21:37
Show Gist options
  • Save rohannog/1342054 to your computer and use it in GitHub Desktop.
Save rohannog/1342054 to your computer and use it in GitHub Desktop.
Remove emacs backup files if newer versions exist
for i in `find . -name "*~"`; do orig=`echo $i | sed -e s/~$//`; if [[ -f $orig && $orig -nt $i ]]; then rm $i; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment