LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-07-2005, 04:18 AM   #1
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Rep: Reputation: 30
Question what is a swap file...?


Hi All.....

Me using one txt filefrom terminal .... suddenly My Computer was improperly shutdown accidentally....then i reboot it..... and trying to use same txt file from terminal.... at that time i got this swap file message.. as follows

E325: ATTENTION
Found a swap file by the name ".Abbrevations_ofComputerWords.txt.swp"
owned by: root dated: Thu Jan 6 11:02:32 2005
file name: ~root/zam/Abbrevations_ofComputerWords.txt
modified: no
user name: root host name: redhat
process ID: 4237
While opening file "Abbrevations_ofComputerWords.txt"
dated: Fri Jan 7 14:50:04 2005
NEWER than swap file!

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r Abbrevations_ofComputerWords.txt"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".Abbrevations_ofComputerWords.txt.swp"
to avoid this message.

Swap file ".Abbrevations_ofComputerWords.txt.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (D)elete it:

*************************************************************************************************
this is the first time i experience with such type of incident..
.............Actually what is this "Swap File"????????????
why it was created?

i went with R option for recovery....? any help would be appreciate

Thnx in advance.
zameer
 
Old 01-07-2005, 04:27 AM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Unlike Windows programs, Linux programs ask you what you want to do in plain english. The message is obvious. What do you think you should do?

Sorry I'm not going to tell you what to do.
 
Old 01-07-2005, 04:39 AM   #3
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Original Poster
Rep: Reputation: 30
well mr electro... actaully my question was ....among 4 options Recovery , Delete, Edit,Read Only.... which option is recommended???????

Suppose what happens when we select first- Delete instead of recovery... ??
I created one file .txt and shutdown improperly.. and then restart this time select Delete option... after that i got my previous file (original file) .... then i created another file .txt and I done same process now this time i select Recovery .... my file was recovered ... i closed this file again i started this .txt file ... i got this swap file message again .... so from this experiment what can i concluded .. that Delete is Recommended than other three options?.....is it correct??????

thnx....
 
Old 01-07-2005, 09:16 AM   #4
jeffsmith8
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Rep: Reputation: 0
I understand "swap file" as being like virtual RAM. I was told the swap file system was introduced to compensate for inadequate amounts of RAM in early computers.

As for your problem I don't know much about linux but I would guess your system did not shutdown cleanly and the text file you were working on "got stuck" in the swap. Recovery was probably the best option so if it works save your text file somewhere and if you get the same message next time you load then delete it.

If you are working from console make sure you shut down propoerly using the "halt" command.

hope that helps
 
Old 01-07-2005, 10:49 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Actually, the swap file was created by vim and has nothing to do with virtual memory. It is a backup file used by the editor. Whether you delete or recover would really depend on the situation.
 
Old 01-08-2005, 05:22 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Quote:
Originally posted by Electro
Sorry I'm not going to tell you what to do.
Useless post. If you are not going to help, why on earth did you bother posting? The original poster is obviously new to this and has never encountered the problem. If you see a post you are unwilling to help with, pass on by: it is pointless to post only to say that you don't want to help.
 
Old 01-08-2005, 05:44 AM   #7
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,832

Rep: Reputation: 47
Good call, Xavier!

---------------------
http://www.oreilly.com/catalog/debia.../glossary.html

Swap File

A disk file or partition used to temporarily store information when system memory runs low.
 
Old 01-08-2005, 06:58 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
From the vim documentation:
http://www.vim.org/htmldoc/recover.html
 
Old 01-09-2005, 10:35 PM   #9
jeffsmith8
LQ Newbie
 
Registered: Jan 2005
Posts: 3

Rep: Reputation: 0
Thanks for the helpful replies,

that documentation has cleared a few things up towards understanding this whole linux thing a bit better...
 
  


Reply



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
swap file linuxhippy Linux - General 4 10-11-2004 04:07 PM
Swap File Cyric Slackware 13 10-04-2004 11:19 PM
Swap file not being used...why? ganja_guru Linux - General 6 12-08-2003 03:41 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 09:09 AM
No Swap File tarballedtux Slackware 4 01-09-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration