LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2003, 12:31 PM   #1
linuxboy69
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 138

Rep: Reputation: 15
How do I remove a swap file


I was editting a file in vi over ssh when my computer crashed and now anytime I goto edit the file a message pops up telling me how to restore and in order to get rid of the message I have to remove the swap file. I have used whereis and locate but can not find this file. The extension is .swp. How do I remove it???
 
Old 11-25-2003, 01:00 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Not sure why it would ask you to remove a swap file, but its probably in your swap memory.

Just perform a:

swapoff /dev/hdXX
swapon /dev/hdXX

Where XX is the letter and number of the location your swap resides.
 
Old 11-25-2003, 01:15 PM   #3
linuxboy69
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 138

Original Poster
Rep: Reputation: 15
Thank you for you help. I did what you posted but that did not remove the swap file. Any other suggestions?
 
Old 11-25-2003, 01:24 PM   #4
linuxboy69
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 138

Original Poster
Rep: Reputation: 15
An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/test/test.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/test/.test.conf.swp" to avoid this message.
"/etc/test/test.conf" 164L, 4274C

This is the error that I get so it actually does specify the directory but there is no file there as described.
 
Old 11-25-2003, 02:22 PM   #5
EyesOnly
Member
 
Registered: Aug 2003
Location: The Netherlands
Distribution: SlackWare
Posts: 202

Rep: Reputation: 30
any files whit a '.'at the beginning are hidden, so that's why you don't see the file

if you cd to /etc/test
and than do a rm .test.conf.swp
it should be deleted.
 
Old 11-25-2003, 04:36 PM   #6
linuxboy69
Member
 
Registered: Oct 2003
Distribution: Redhat 9
Posts: 138

Original Poster
Rep: Reputation: 15
Yeah, I finally got rid of it. I feel like an idiot as I am sure that I tried that but I must have mispelled it and not tried again.

Thanks for your help and I owe you one.
 
  


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
swap file linuxhippy Linux - General 4 10-11-2004 05:07 PM
Swap File Cyric Slackware 13 10-05-2004 12:19 AM
c++ file processing -- how to remove a record from a file sharonyiisl Programming 4 09-26-2004 04:54 AM
create and remove swap space cbarbot Linux - Newbie 1 04-14-2004 12:42 PM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 10:09 AM


All times are GMT -5. The time now is 08:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration