Skip to main content


Showing posts from 2016

How much space emacs backup files are using...?

Every time I use emacs, it automatically saves a backup file which filename ends with "~".
From time to time, I issue a recursive find command to wipe out  (delete) every emacs backup file from my home folder.
find . -iname \*~ -exec rm -rfv {} \;
And everything is clean.

I do it strictly to clean things up... not for any disk space concern...  But I was wondering how much disk space those backup files are consuming...

So, instead of an rm command, I had executed a df and piped all to awk to summarize...
find . -iname \*~  -exec du -s {} \; | cut -f 1 | awk '{s+=$1} END {print s}'

This time all the emacs backup files were consuming only 1.6M, which isn't big deal... but I think it is better to get rid of them.