LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-21-2003, 11:11 PM   #1
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Mysteriously appearing #files#


I figure this is a real newbie question, so I'm posting it here. I've got three files in my home directory called #foo# and I was thinking they might be from crashed vim sessions, but I wasn't sure. I checked what seemed relevant in the vim docs but didn't turn up anything. And I tried searching here and didn't turn up anything either, which leads to a second newbie question - do I need to escape or quote characters like '#' on an LQ search?

So does anyone know what's creating these and what the significance of them is? I compared two of the files to regular files of the same names and they are the same until the #foo# file runs out, so I figure I can just delete them. The third file was something I was editing, but I deleted the other copy and all there is is a #foo# file. I'd delete that too, as long as it didn't cause something else to wig out.
 
Old 02-22-2003, 01:25 AM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
Some editors make automatic backups of files. Perhaps

man <editor>

might tell what form it uses if it has this feature.
 
Old 02-22-2003, 08:21 AM   #3
mhearn
Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
Yeah, I get them too. They are just backups, you can delete them if you don't want them
 
Old 02-22-2003, 12:43 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
From my experience with emacs, they are backup files. As you edit a file, if a certain amount of time passes, it saves the current buffer and adds the #'s to signify it's a backup. When you choose to save the file, the backup is automatically deleted. If you exit the editor with changes that are unsaved, then the backup file remains. Then next time you open that file, you may get a message asking you if you want to load the backup instead of the original.

You can delete them, but it will get tedious if they're a frequent problem. It'd be best to turn the backup feature off, get in the habit of saving often, or undo until you get back to the last spot you saved the file at.
 
Old 02-23-2003, 02:11 AM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
Ah, thanks everybody. No wonder I couldn't find anything in the vim pages if it was emacs. I was thinking vim did a foo~ for backups (my directory's full of those, but that's fine), but thought these might indicate a particular kind of backup or something. But they must have been from when I was trying emacs out. Cool. I'll delete them without worrying about it then.
 
Old 02-23-2003, 10:26 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
Vim may do the same thing... I can't honestly say. I do know that emacs wil make the ~ backups as well. The difference being, the ~ files are the last saved version of the file. The # files contain edits that have not been saved.

Soooo, for the sake of beating this horse just a bit more... When you edit a file the ~ file is left unaltered, but the # file is created, saving your current edits. When you choose to save the file, the ~ file is updated to hold the previous save and the # file is deleted...

Again, this is emacs behavior, but I would bet vim could be configured to behave the same way... perhaps it's default behavior.
 
Old 02-24-2003, 02:00 AM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Original Poster
Rep: Reputation: Disabled
I ran the file I'd deleted through emacs and that's exactly it - it told me the file didn't exist but there was a version I could recover, so I did, just for the practice. That's a cool system. One thing I hate about DOS/Win stuff is you invariably have to configure it to save backups, which are off by default - if it'll do backups at all. With Windows crashing all the time, no I don't want backups. It's not like I value my work or anything. With most Linux editors, you get auto backups and sometimes a pair of them. Thanks for the explanation about which was which and why.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
murdered mysteriously divorce3 Linux - Newbie 1 12-26-2004 12:31 AM
Internet Connection Mysteriously Goes Down KingofBLASH Slackware 6 10-09-2004 10:29 PM
x mysteriously crashed |2ainman Linux - General 1 04-25-2004 12:02 AM
murdered mysteriously hooligan Linux - Software 1 10-18-2001 06:45 AM
Mysteriously Murdered??? Brandis Linux - General 2 05-22-2001 03:28 PM


All times are GMT -5. The time now is 05:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration