Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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.
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.
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.