LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-16-2016, 07:44 AM   #1
freeroute
LQ Newbie
 
Registered: Jul 2016
Posts: 28

Rep: Reputation: Disabled
Convert targa image data to text


I have a 2 GB txt extension file. If I would like to search with grep for a row e.g.
Code:
$: grep automobile /media/root/WD_Passport/raw_info_251015.txt
I got this message: Binary file /media/root/WD_Passport/raw_info_251015.txt matches

$ file /media/root/WD_Passport/raw_info_251015.txt
/media/root/WD_Passport/raw_info_251015.txt: Targa image data - RGB - RLE 10

Is it possible to convert this file to a simple txt file somehow?

Thank you in advance.
 
Old 11-16-2016, 07:58 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
No, a Targa image file is in a nutshell is a graphics file not text. Can you provide more information about how the file was created?

https://en.wikipedia.org/wiki/Truevision_TGA
 
Old 11-16-2016, 08:00 AM   #3
freeroute
LQ Newbie
 
Registered: Jul 2016
Posts: 28

Original Poster
Rep: Reputation: Disabled
Thank you very much.
I just downloaded from a site as a text. So it is not a text...
 
Old 11-17-2016, 10:51 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Some downloaders/filters choke on strange extensions, so sometimes the file is (temporarily) 'named' .txt ... Names are convenient for humans, but not always accurate ...
An old trick to get an MSWin user to download a virus was to add a 2nd extension eg a.exe.txt; hence a lot of modern filters refuse double extension files.
 
  


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
How to convert PDF Files to Text/image/Word/HTML? sholdon Linux - General 5 05-17-2012 03:45 AM
With Tesseract, how do I convert a tiff image to text via terminal? Advice Pro Linux - Software 2 01-06-2012 08:30 PM
Convert text to image? J_Szucs Linux - Software 5 04-04-2009 03:48 PM
convert image to text? tramni1980 Linux - Desktop 4 12-18-2006 04:29 PM


All times are GMT -5. The time now is 04:38 AM.

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