LinuxQuestions.org
Help answer threads with 0 replies.
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-05-2006, 01:00 PM   #1
true_atlantis
Member
 
Registered: Oct 2003
Distribution: fedora cor 5 x86_64
Posts: 639

Rep: Reputation: 30
how to view binary logs


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

Last edited by true_atlantis; 04-05-2006 at 01:04 PM.
 
Old 04-05-2006, 03:03 PM   #2
Hobbletoe
Member
 
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 17
Posts: 150

Rep: Reputation: 18
You could try strings. I use it to view non-text files.

Code:
strings <file name> | more
 
Old 04-05-2006, 04:11 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,192

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
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.
 
Old 04-05-2006, 05:15 PM   #4
true_atlantis
Member
 
Registered: Oct 2003
Distribution: fedora cor 5 x86_64
Posts: 639

Original Poster
Rep: Reputation: 30
is binary log file more specific... i would assume it is a text file but not sure which type
 
Old 04-05-2006, 08:06 PM   #5
Hobbletoe
Member
 
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 17
Posts: 150

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


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
system logs: a better view. aquaboot Ubuntu 3 09-10-2005 11:56 AM
Change name of mysql's binary logs Ratclaws Linux - Software 0 09-07-2005 01:53 PM
Firefox logs user out? Where are error logs? case1984 Linux - General 0 10-09-2004 02:22 PM
Separate firewall logs and general logs dominant Linux - General 3 04-20-2004 01:26 AM
how to view logs of boot up? koyi Linux - Newbie 4 08-02-2003 03:32 AM

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

All times are GMT -5. The time now is 08:59 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