UNIX Socket FAQ

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

kushalkoolwal
Member
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.

Thanks


Kushal

Offline

#2 2004-03-11 01:22 AM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

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...

Offline

#3 2009-07-31 05:19 PM

adkein
Guest

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

Naguellegange
Guest

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

Magnificent phrase

Board footer

Powered by FluxBB