2

I am trying to made a program to experiment bitwise operators. The name of the program is bitwise.c

Before compiling the program, I decided to look at the directory just in case I don't get the name wrong.

alexander@debian:~/Dropbox/src_code/C$ ls
bitwise bitwise.c  bitwise.c~

What is bitwise.c~ and why is it hidden from the file location?

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
rooxgray
  • 43
  • 1
  • 5

2 Answers2

2

This file is most likely created by the editor in which you have bitwise.c file open. Some editors create a temporary file while you are editing one, to track all the changes in case the program would crash without saving the file. The file should be gone once you stop editing the file.

ek9
  • 2,875
  • 3
  • 18
  • 27
  • If my editor called "gedit" were to crash and I forgot to save it, will my program be saved from the changes `bitwise.c~`? – rooxgray May 30 '14 at 08:40
  • These are backup files for gedit. I think the previous version is backed up upon saving it instead. – ek9 May 30 '14 at 08:47
  • I exited my gedit and the `bitwise.c~` still remains. You said that the file should be gone but it still remains. Why is that? – rooxgray May 30 '14 at 20:53
  • "... the previous version is backed up upon saving it instead." – ek9 May 31 '14 at 09:58
0

By convention, files ending with ~ are backup files in UNIX. This file should contain copy of your file before last edit.

gena2x
  • 2,387
  • 14
  • 20