Tim,

This looks like what happens when you edit something in Joe--it
automatically creates a copy of the file being edited as filename~.  This
is basically a backup file, and it will stick around until you delete it.
I seem to remember reading that there is a way to turn it off in one of
joe's config files, but can't remember which one.

Michael

--
Michael Viron
Registered Linux User #81978
Senior Systems & Administration Consultant
Web Spinners, University of West Florida

At 10:57 AM 07/15/2001 -0400, Tim Holmes wrote:
>Maybe somebody can shed some light on this subject.
>
>I write a lot of scripts, and I go back and revise them as well.  Well I
>keep noticing files that have a ~ at the end of the file.  For example,
>one of the first scripts I tested when learning expect.
>
>[timh@r2d2 bin]$ ls -la aftp*
>-rwxr-xr-x    1 timh     timh          142 Jul 15 10:53 aftp*
>-rwxr-xr-x    1 timh     timh          142 Jul  1 19:45 aftp~*
>
>But the files are the same.
>
>[timh@r2d2 bin]$ diff aftp aftp~
>
>They both look like this.
>
>[timh@r2d2 bin]$ cat aftp
>#!/usr/bin/expect
>log_user 0
>proc domainname {}      {
>        set file [open /etc/resolv.conf r]
>        while {[gets $file buf] != -1}  {
>                if {[scan $buf "domain %s" name] ==1} {
>                        close $file
>                        return $name
>                }
>        }
>        close $file
>        error "No domain declaration in /etc/resolv.conf"
>}
>spawn ftp $argv
>expect "Name"
>send "anonymous\r"
>expect "Password:"
>send "anon@[domainname]\r"
>log_user 1
>interact
>
>But as soon as I edit it, then close it out, there's a "temp" file there
>and it always ends in ~.  What's this all about?  How long do these files
>stick around?  I've often just gone and removed them, but now I'm real
>curious as to what's the point of them.
>
>Thanks for the help.
>tdh
>
>-- 
>T. Holmes
>-----------------
>UNIXTECHS.org
>[EMAIL PROTECTED]
>-----------------
>"Real Men Us Vi!"
>
>Uptime: 
>  --------------------------------------------------------------------
>10:52AM  up 12:43, 3 users, load averages: 0.00, 0.01, 0.00
>  --------------------------------------------------------------------
>                       Your Fortune
>               AMAZING BUT TRUE ...
>
>If all the salmon caught in Canada in one year were laid end to end
>across the Sahara Desert, the smell would be absolutely awful.
>

Reply via email to