Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-01-2004, 09:08 AM   #1
LQ Newbie
Registered: Mar 2004
Location: Frimly Surrey UK
Posts: 2

Rep: Reputation: 0
I want to recover a file that I was editing

I was creating a shell script called "contactd" on a VMware session running Linux 7.2 and when I closed it down on Friday it seemed all ok. However now when I try to edit the file I get a message as follows.
Found a swap file by the name of ".contactd.swp"
ownerby : root
file name : contactd
host name: xxxx
While opening file "contactd"= date "mondays date"

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 with the file crashed.
If this is the case use ":recover" or "vim -r contactd"
to recover the changes (see ":help recovery")
if you did this already delete the swap file "contactd.swp"

The file "contactd" is there but is back to how it was before I started editing it on Friday after my last save but everything I typed in in the afternoon is missing. If I run "ls -l .contactd.swp" it shows that this file is also present with "18884 Feb 08:04 time stamp on Saturday".

Question is does anyone out there know how I can recover the original file from the ".contact.swp" file. Please.

Regards Wilfman............
Old 03-01-2004, 01:57 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Welcome to LQ.

Try reading "2)" in your post.

Moved to Linux->General


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recover my init.d file. davis14 Linux - Newbie 2 08-22-2005 12:03 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 04:15 AM
How to recover a damage file? ricguitar Fedora 3 08-03-2004 05:23 PM
Help me recover a file sofasurfer Linux - Newbie 1 12-30-2003 04:09 PM
file recover mnauta Linux - General 1 06-02-2003 04:56 PM > Forums > Linux Forums > Linux - General

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

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