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, 11: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"mf*{JKVY\Bb
9$
ysOEC@Tj+f
Q k qӮz2f9ɫm
Ydcm`XUP*γPI]'MOxG+~(v{*_;^.
f'Gl|{IWW
NM`
90OO{ mIwr@}uPgR*XE%tW
?ۡjh px :33odz-y5i&gbWz=_a^T`p3DC|4c9*k&$-h.`^D
{*.+pq&%*U1xe-2S
'&6֦cX{J`^'$#AV+


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 11:16 AM.
 
Old 04-29-2012, 11: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, 11: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, 12:06 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
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 09:46 AM
[SOLVED] read a text file distrubute its contents on different text files magische_vogel Programming 13 02-26-2011 07:51 PM
Cannot read text from text file and store it in a variable using shell script anurupr Linux - Newbie 2 03-03-2010 02:38 PM
Edit a large text file emclinux Programming 8 04-25-2009 05:54 AM
Edit Text file abridge Linux - Newbie 1 02-16-2007 07:00 PM


All times are GMT -5. The time now is 10:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration