LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2012, 10:08 AM   #1
morad_dba
LQ Newbie
 
Registered: Jun 2010
Posts: 18

Rep: Reputation: 0
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.

Last edited by morad_dba; 04-29-2012 at 10:16 AM.
 
Old 04-29-2012, 10:39 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
In the directory look for the backup file named whatever~
rename it and see if it is readable
 
Old 04-29-2012, 10:56 AM   #3
morad_dba
LQ Newbie
 
Registered: Jun 2010
Posts: 18

Original Poster
Rep: Reputation: 0
No I did not find any hidden file using ls -al
 
Old 04-29-2012, 11:06 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
That is because it is not hidden, it just has the ~ added to the name.
 
  


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
Help to edit a large text file grandeabobora Linux - Newbie 6 10-27-2011 08:46 AM
[SOLVED] read a text file distrubute its contents on different text files magische_vogel Programming 13 02-26-2011 06:51 PM
Cannot read text from text file and store it in a variable using shell script anurupr Linux - Newbie 2 03-03-2010 01:38 PM
Edit a large text file emclinux Programming 8 04-25-2009 04:54 AM
Edit Text file abridge Linux - Newbie 1 02-16-2007 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:40 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
Open Source Consulting | Domain Registration