LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to view binary logs (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-view-binary-logs-432030/)

true_atlantis 04-05-2006 01:00 PM

how to view binary logs
 
what application is used to view binary log files? in a shell / text based...

Hobbletoe 04-05-2006 03:03 PM

You could try strings. I use it to view non-text files.

Code:

strings <file name> | more

haertig 04-05-2006 04:11 PM

Quote:

Originally Posted by true_atlantis
what application is used to view binary log files? in a shell / text based...

You would need whatever application understands the structure of the binary file. For example, a JPG picture is a binary file. So is an MP3 music file. There is no "generic" viewer that will handle both these binary file types and every other (infinite) number of binary file formats out there. The application has to specifically be coded to understand what it's viewing.

Failing that, you can just edit the binary file with a text editor. It will look like gooblty-gook, but you can do it. You could use "od -c" to dump it out. But you'll have to understand the file's format and manually decode it with your brain. "binary" is not a specific format.

true_atlantis 04-05-2006 05:15 PM

is binary log file more specific... i would assume it is a text file but not sure which type

Hobbletoe 04-05-2006 08:06 PM

If you use the file command, it will tell you what type of file you are looking at, even if it has the wrong extention (I had a bz2 file mascarading as a gz file once, and file told me what it was). However, if it is a binary file with a magic number not recognized by file, it will probably just tell you "data".

Code:

file <filename>
Maybe if you tell us what command is creating this log file, we can give you a better idea of what to use.


All times are GMT -5. The time now is 01:21 PM.