I have files ending in ~ in my home directory, and I want to delete them. How do I do that? How do I prevent this backup functionality?
-
2I hope you don't have cause to regret preventing backup functionality! – Jul 06 '13 at 17:07
-
1No, I already have other ways to backup my work, but I just think that this kind of backup is meaningless. I prefer external copies or the cloud. – Flair Jul 06 '13 at 21:27
3 Answers
If you also have unwanted backup files in subfolders, it gets a bit more difficult:
find . -type f -name '*~' -delete

- 3,188
You can simply run rm *~
if you're sure there is no other file that you need which ends in ~
If it is gedit
that is creating the backup files, you can open gedit and select Edit->Preferences->Editor
and uncheck the option "Create a backup copy of files before saving"
And for nano
, look in /etc/nanorc
for:
## Backup files to filename~.
set backup
and change that to
## Backup files to filename~.
# set backup

- 372
-
I already removed nano anyway. Is there a way of removing gedit without breaking the kernel? – Flair Jul 06 '13 at 21:18
-
just do "sudo apt-get remove gedit". Btw, Do you have another editor installed? – rahules Jul 06 '13 at 21:20
-
-
1You may like to have a look at this. http://askubuntu.com/questions/97683/how-can-i-change-the-default-text-editor-from-gedit-to-vim – rahules Jul 06 '13 at 21:24
-
-
Aren't you getting Vim in the Open with list? Right click on a file and choose open with other application. – rahules Jul 07 '13 at 17:25
-
No, I still have gedit. The only thing that seems to happen is that when I search for via dash, Vim has its own icon now which is blank. – Flair Jul 11 '13 at 17:48
The hidden files are in place to keep user program setup and other program information.
I strongly suggest you to not delete those files.
If you a sure to want to delete them, then open the menu Places->Home Folder (press CTRL+H if you don't see hidden files) and then select and press the Delete keyboard key. If you don't want move them into trash press Shift+Delete keyboard keys
From terminal you can delete hidden files ( don't do it ) with: rm -fr /home/youruser/.*

- 228
- 1
- 8