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 or other applications. It is safe to delete them, but there is no harm to leave them on your computer.
These files are hidden by default. If you are seeing them, that is because you either selected Show Hidden Files (in the view options menu of the Files toolbar) or pressed Ctrl+H. You can hide them again by repeating either of these steps.
These files are treated in the same way as normal hidden files. Seefor advice on dealing with hidden files.