A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2004-03-10 08:44 PM

Registered: 2004-02-27
Posts: 12

Re: Creation of Temporary files with ~(tilde) sign

Hi friends,

I am developing a file copy program on the Red Hat Linux 8.0 Kernel 2.14-18. Now when ever i run my program which ask for Source and Destination Directory my software works fine and the files are also copied. But along with that sometimes there are some files with ~ (tilde)sign, For example if there is a file called termcap then a file called termcap~ is also seen in the source folder ( not  in the browser i.e. Nautilis but in the konsole or xterm when i give the command "ls" or "ll" ).

why is this happening? how can i get rid of this problem? i am using sendfile() command on the source side and normal recc() function on the destination side.




#2 2004-03-11 01:22 AM

From: Boston, MA
Registered: 2002-06-12
Posts: 3,839

Re: Creation of Temporary files with ~(tilde) sign

I believe files ending with "~" are typically backup files created
by things like Emacs...  It's the only thing I've aware of right
offhand which would create such things...


#3 2009-07-31 05:19 PM


Re: Creation of Temporary files with ~(tilde) sign

ls -B lists files in a directory, omitting files whose names end with a tilde.

If you use ll, I suggest adding the -B option only to ll alias in your .bashrc file, so that you can use ls to find the backup files, should you ever need them. The tilde files are aesthetically annoying, but unless you are perfect you might want to think twice before disabling backup creation in whatever text editor you are using.

From my .bashrc file:
alias ls='ls --color=auto --group-directories-first'
alias ll='ls -l -B'

#4 2009-12-17 01:17 AM


Re: Creation of Temporary files with ~(tilde) sign

Magnificent phrase

Board footer

Powered by FluxBB