LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-21-2009, 08:02 AM   #1
jatin
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Rep: Reputation: 0
Exclamation filename ends with ~ in my home directory...


Dear all


I see some file like txt files ends with ~ character e.g myname.txt at the same time I see myname.txt~

why like this ??? should I remove that file to free-up the disk space


regards
 
Old 05-21-2009, 08:11 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
These are backup files. They are automatically created from some editors (e.g. gedit) when you modify a file. They are the original copy without the last modification (verify using the diff command).

In gedit you can disable this feature: uncheck Edit --> Preferences --> Editor --> "Create a backup copy of files before saving".
 
Old 05-21-2009, 08:20 AM   #3
jatin
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Original Poster
Rep: Reputation: 0
Lightbulb

Quote:
Originally Posted by colucix View Post
These are backup files. They are automatically created from some editors (e.g. gedit) when you modify a file. They are the original copy without the last modification (verify using the diff command).

In gedit you can disable this feature: uncheck Edit --> Preferences --> Editor --> "Create a backup copy of files before saving".
Thnx for the reply.... I think I should keep it as it is ( in gedit settings ) .. ... what will happen to that file...??? file will remain forever there or will be removed by the system automatically or I've to remove that files manually to free-up some disk space


Regards
 
Old 05-21-2009, 08:26 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It will stay there forever, as any other regular file, until you remove it. If you want to remove all the backup files at once, use find:
Code:
find $HOME -type f -name \*~ -ok rm {} \;
the -ok action just asks you if you want to remove the file. If you trust the result of your find command (and you want to spare typing yes over and over) just use -exec in place of -ok and the trick is done.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Home directory already exists. Please enter another home directory path." Daravon Ubuntu 2 02-15-2009 10:26 PM
contents of 'home' directory found at sda5: mounted as /home, and also on sda6:/home leswatson Linux - Newbie 4 04-18-2008 04:02 PM
filename ends in '\' won't open in emacs or with cat command - why? tardo0807 Linux - Newbie 2 02-14-2008 10:11 AM
Longest filename in a directory dresch Linux - Newbie 6 01-05-2007 03:29 PM
read filename from directory newbielinux Linux - Newbie 2 03-02-2004 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration