tilde files ~

Jason Powers powers.jason at jimmy.harvard.edu
Sat Feb 19 01:45:06 UTC 2005


I think if you're new to the various *nix-type OSes in general, this is
a valid question. I remember my first encounter with emacs about 10
years ago, and if I didn't have someone sitting in the same office as me
who'd used it since the 80s I'm not sure how long it would have taken me
to figure out wtf the ~ were for. I think it's good you sent this here
instead of looking at google: as much as it's important to do your own
homework, it's useful to have someone pass on some wisdom they gained
form experience or another teacher.

Here's mine:

For the most part, every emacs install I've come across has defaulted to
the file~ setup: If I open a terminal and type

emacs foo.bar

emacs sees that foo.bar already exists and moves it to foo.bar~ before
letting me edit the new copy. I assume this is in case of disconnect,
though I do find it useful when I screw up and over time have considered
various schemes to expand on it for version control and typo protection
of a sort. If gedit does the same thing, Marc, then you have your
answer. the file with the ~ is the one previous to your last edit.

Here's the wisdom bit, which I got from the same person who taught me
probably 80% of what little I know: As you use unix you'll come across
situations where only vi is installed. VI does not have the same habit
emacs does, in fact the two seem to be designed to be each other's
opposite. I recommend anyone who uses linux learn at least the basics of
both emacs and vi (navigate, edit, exit, save, maybe search), you WILL
come across one of them in a terminal window one day.

>From my own experience: I recommend anyone who installs or maintains
linux for others know these both very well, your users will be very
partisan about them and will demand their favorite customizations. Emacs
and vi are the original bsd vs. linux, you may as well get familiar with
both.

Jason Powers

Marc M wrote:
> Hi, 
> 
> Dumb question but nonetheless --
> 
> I have duplicate named files with tildes at the end.  Example: 
> file1.txt and file1.txt~
> 
> Are they fragments or something left in RAM?  What's the differrence
> between them and the regular named file?  I use gedit and always close
> my files when I am done.  Is the filesystem creating that?  Other than
> deleting them, what can I do to not have them?
> 
> Any  help is appreciated
> 
> Thanks
> Marc
> 




More information about the fedora-list mailing list