In Linux, does Filename followed by tilde character imply a backup file?

i.e.

filename.h~

What kind of file is this?
LVL 1
naseeamAsked:
Who is Participating?
 
HackneyCabConnect With a Mentor Commented:
Yes, seems that Vim does create backups ending in a tilde:

http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl

You can delete the backup files any way you like, so long as you're confident that you still have the master copy.
0
 
gtkfreakConnect With a Mentor Commented:
If you use gedit to edit your files, their backup gets stored as filename.txt~. file.h would become file.h~
That is what it would imply.
0
 
HackneyCabCommented:
Yes, that is usually the sign of a text editor saving a backup copy.

If they disturb you, you can remove those files with

rm *~

(but be very careful with the rm command and wildcards).
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
arnoldConnect With a Mentor Commented:
This usually means that you were editing the file using vi,emacs,pico and the application was terminated.  Another option is that you were running patch but the context was not matched.
using the "file" command you can see the type of file you are looking at.
This is a header source file.more filename.h\~.
0
 
HackneyCabCommented:
Not necessarily. The text editors I've used seem to save backup files regardless. My web development area is littered with files ending with a tilde.
0
 
naseeamAuthor Commented:
I'm using Codewright V7.0 for editing files.
0
 
naseeamAuthor Commented:
>>  If they disturb you, you can remove those files with

rm *~

I can also delete them from Windows Explorere, right?
0
 
naseeamAuthor Commented:
I get two files:

filename.bak
filename.cpp~

Are they both backup files?
0
 
arnoldCommented:
It all depends on the application/program you are using when these occur.
It is impossible to say since there are different scenarios when these types of files are created.

0
 
naseeamAuthor Commented:
I don't think Codewright is creating files followed by tilde because everytime I edit a file in Codewright, I get a filename.bak

Once in a while I use Vim editor.  Maybe Vim is creating tilde file.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.