LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Convert targa image data to text (https://www.linuxquestions.org/questions/linux-newbie-8/convert-targa-image-data-to-text-4175593636/)

freeroute 11-16-2016 06:44 AM

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.

michaelk 11-16-2016 06:58 AM

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

freeroute 11-16-2016 07:00 AM

Thank you very much.
I just downloaded from a site as a text. So it is not a text...:(

chrism01 11-17-2016 09:51 PM

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.


All times are GMT -5. The time now is 07:44 AM.