LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can not read text file after edit using vi (https://www.linuxquestions.org/questions/linux-newbie-8/can-not-read-text-file-after-edit-using-vi-942407/)

morad_dba 04-29-2012 10:08 AM

can not read text file after edit using vi
 
Dear all,

I tried to edit a text file using vi and after modification if saved the file using :x

Now i can't see the content using cat command. When i
issue the command

cat alert_db.log

It displays some absurd symbol as follows

Î|×63"mã¥f©¦*{JKVY\ïBØb
Ó9¤²$
ÕàÙy÷súÈÇOøâÈECÃþ@üîT«j+fî
ÆQ k qÓ®z2fÊë¨ý9®É«m
Yðdcím¤º`ÔXUPÑ*γÜPI]Ççß'M¬OéxG±+~(v{¯*_þ;^ä.®
f'çGl|{IÆWÝW
©NM¦`é
90O¬O{ m±IwËúrøÕ@}øñuá¹øPgR*XéE»%tW
÷?£Û¡»jh àpx¥Ù :¯33odz¡-y5ÒÌýÏi&gbWz=§´Õ_¬Ééªa¤£^ÒT©Íø`ýpØ3DC|4cÌ9*ÃäkÔ&$¡-Ìh.É`¶^äDåó
{*Á.+Ìpq&%*U1xe-2S¬«
'&6ÝÖ¦£ëcÆöX{õJò`Þ^ÿô'Ã$#AóV+


Another thing is that I may use the command tail -3.50 alert_db.log in place of tail -300 alert_db.log

Please help me .. what to do... It is very important file

Regards.
Morad.

amani 04-29-2012 10:39 AM

In the directory look for the backup file named whatever~
rename it and see if it is readable

morad_dba 04-29-2012 10:56 AM

No I did not find any hidden file using ls -al

TobiSGD 04-29-2012 11:06 AM

That is because it is not hidden, it just has the ~ added to the name.


All times are GMT -5. The time now is 05:10 PM.