What is a file with a "~" at the end of its name?

Files with a "~" at the end of their names (for example, example.txt~) are automatically created backup copies of documents edited in the Gedit text editor, as well as in other applications. It is normally safe to delete them, but there really is no need to.

These files are hidden by default. If you are seeing them, that is because you either selected View ▸ Hidden Files or pressed Ctrl+H. You can hide them again by repeating one of these steps.

These files are treated in the same way as normal hidden files. See Hide a file for advice on dealing with hidden files.