You are not logged in.
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.
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...
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'