![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| *** glibc detected *** double free or corruption: 0x40236ff4 *** | norsk hedensk | High Level Programming | 19 | 2 Weeks Ago 10:43 AM |
| ftp zip files corruption | colesga | Shell Programming and Scripting | 3 | 08-02-2007 08:22 AM |
| Reading file names from a file and executing the relative file from shell script | anushilrai | Shell Programming and Scripting | 4 | 03-10-2006 02:25 AM |
| NTFS corruption under w2k but not under suse 9.2 | mickepe | Windows & DOS: Issues & Discussions | 4 | 08-05-2005 05:19 PM |
| data corruption with ftp transfer | malcom | UNIX for Advanced & Expert Users | 12 | 08-04-2003 04:38 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
file corruption
Hi,
All of a sudden I landed in a strange problem. I was working with my C source code in vi editor. I did a wq! and when reopened, the file is full of "data".. I mean the text contents are gone!!. I believe this is a file corruption. I have tried the -r option with vi, but no success. Is there any way to recover the file. ?? Thanks in Advance... |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
backup backup backup ....
Go to /tmp or /var/tmp, depending on where your vi temp files go, and look for the files that are your buffer. They may still be there.
You might get lucky and be able to recover something. Always make a backup of your scripts, it might save you from this in the future. I had a DBA that lost 3 hours worth of work because his telnet window died. If you have some kind of incremental daily backup to pull from if this is a script you have been working on for a few days.
__________________
My brain is your brain |
|
#3
|
|||
|
|||
|
i have $20 that says he actually did a X! enter enter.
heh. no need to be ashamed if you diid a X vs x. you just used crypt on your file. heh. it happens. |
|
#4
|
|||
|
|||
|
That was G R E A T ...... Kudos !
BTW, I was unaware of X! feature. .. Infact, this has happened ( like Enter Key: ) in between and I come out of that with :q. I continued the editing.. and finally saved it, it got "crypted".. thanks a lot for identifying it.. BTW, is there any way to uncrypt it... ? Once again, that was a great point... |
|
#5
|
|||
|
|||
|
Hi..
I could find the decrypt method... cat crypted_file | crypt > output_file This will ask for "Enter Key" to decrypt the file.. Enter the key and recover the file... BTW, unfortunately, I typed lot of ^H to come out of "Enter Key:" in vi editor without knowing the crypt feature.. .... And I lost there... |
|
#6
|
||||
|
||||
|
You can also use crypt this way.
crypt < cryptfile.in > uncrypted.out You may still be in trouble. Because I believe that you may not be able to recover what you typed as the password to crypt it.
__________________
My brain is your brain |
||||
| Google The UNIX and Linux Forums |