file~ is the backup file emacs creates automatically for you, when you edit a file.
this way you can step back one edit of the file if you want to undo your changes.
file~ is created only when you edit the file. if you open the file and simply read it without editing, then no file~ is created.
also file~ is not a temporary file, its just a copy of your old file.
using emacs you can safely edit system files to try new settings, if they don't work then getting the default sys file is as easy as
mv file~ file
|