file corruption


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users file corruption
# 1  
Old 09-05-2002
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...
# 2  
Old 09-05-2002
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.Smilie

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.
# 3  
Old 09-05-2002
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  
Old 09-06-2002
MySQL

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  
Old 09-06-2002
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  
Old 09-06-2002
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.

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Root user not recognizing on Solaris-10 (shadow file corruption)

Hello, I got into a wired state on one of solaris 10 server. When I noticed that server is having some issue, I found that there were dumpadm.conf entries in /etc/shadow and real entries were wiped of. Probably somebody fat fingers. I was able to boot into failsafe, break SVM mirror, copied... (25 Replies)
Discussion started by: solaris_1977
25 Replies

2. UNIX for Advanced & Expert Users

File System corruption

Hi, While a tar file was created, the file system got full and there was no message on the tar failure. Then the system was shut down and the administrator says because the file system was full the shut down procedure corrupted the file system. I'm wondering, unix should have given some... (2 Replies)
Discussion started by: manivanm
2 Replies

3. Programming

FORTRAN: double free or corruption

Hello. I'm looking for a quite "interesting" bug I'm using fortran 90, compiler gfortran and the main idea is for every time step I build a bin structure for search contact between particles, for this at the begining TYPE :: circle_index INTEGER(kind = 4) :: ind_p TYPE(circle_index),... (1 Reply)
Discussion started by: Marce
1 Replies

4. Emergency UNIX and Linux Support

XDMCP and VNC graphics corruption

I'm trying to create a persistent KDE session and access that login remotely. While logged into the remote machine I have enabled XDMCP and started a VNC server that requests a login screen. vnc4server -query localhost -geometry 800x480 -depth 8 When I try to view that vnc screen the... (5 Replies)
Discussion started by: cue
5 Replies

5. UNIX for Advanced & Expert Users

File system testing for Data corruption

Hi, could any one tell is there any test-suite or any idea How to do data corruption validation testing, means there is no any data corruption ? Regards Manish (1 Reply)
Discussion started by: manish_tcs_hp
1 Replies

6. Emergency UNIX and Linux Support

DSEE LDAP corruption

Today when someone was using Sun Identity Manager to modify a directory managed by Sun Directory Server Enterprise Edition (DSEE 6.3) IDM spit out an object class violation error (I verified that the input data was valid). It also corrupted the directory to the point where I can't even get dsadm to... (7 Replies)
Discussion started by: ilikecows
7 Replies

7. Solaris

Data corruption

I have a solaris 5.6 on which oracle is installed. we have an alert file alert_net1.log now whenever any datacorruption happens we get the file id and block id in the above file. through this file and block id , we try to find out which table is corrupted and then try to... (1 Reply)
Discussion started by: asalman.qazi
1 Replies

8. AIX

File System Corruption on IBM DS8300

Hi All, We are facing the problem of file system corruption on DS8300,we have done very much effort to find out the root cause of problem but we still not get any success, we have AIX 5.3 OS installed on system with latest patches, we have upgraded HBA firmwares, DS8300 firmware, System... (5 Replies)
Discussion started by: m_raheelahmed
5 Replies

9. UNIX for Advanced & Expert Users

rsync data corruption

Dear Peoples I am using the following command to transfer the files inbetween two servers, i am using this command in a crontab for doing it in every 1 hour on all days. rsync --stats --archive --verbose --compress --force --rsh=ssh --exclude-from=/root/cfg/mkt_scn.exclude... (1 Reply)
Discussion started by: thameema
1 Replies

10. Windows & DOS: Issues & Discussions

NTFS corruption under w2k but not under suse 9.2

Hello all, I´ve bumped into some strange things with a NTFS partition of mine. I am running a dual boot machine with w2k and suse 9.2. I just reinstalled w2k on it. After that one of my NTFS partitions stopped working under windows. Though it is perfectly readable from linux. Windows sees the... (4 Replies)
Discussion started by: mickepe
4 Replies
Login or Register to Ask a Question