Sponsored Content
Top Forums UNIX for Dummies Questions & Answers viewing/information of binary files Post 302091503 by jim mcnamara on Tuesday 3rd of October 2006 11:15:57 AM
Old 10-03-2006
The file command line utility tells you what flavor of binary file you have.
In general, you have to know the file layout, and read it with code (usually stuff you write in C or perl) that is set for that format - in order to get information like numeric binary data into human readable form.

example:
Code:
/home/jmcnama> file RegBill01.ps
RegBill01.ps:   postscript file

There are other utilities like strings and what -- they will also render some data into a human readable format.

Otherwise you have to find/write something to read a binary file
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Viewing files in a directory?

How do I view files in a directory? (1 Reply)
Discussion started by: Ania
1 Replies

2. UNIX for Advanced & Expert Users

viewing binary files in ASCII

Hi, How to view binary files in ASCII format.???????????????? Bye (2 Replies)
Discussion started by: manjunath
2 Replies

3. UNIX for Dummies Questions & Answers

Viewing Tar files

I have backed up a job ona ait tape from unix. i would like to retrieve the data from that tape from a windows pc. i am aware that there may be software available that will allow windows to recognise .tar files. does anyone know where i can source this software or is there any other options (1 Reply)
Discussion started by: mapping
1 Replies

4. UNIX for Dummies Questions & Answers

Viewing files

I have a file (called CORE) that is a dump created by a crashing process. This file, I believe, is in "binary" form, so when I try to use cat, more, or vi on it, it has a bunch of garbage. Is there anything I can use to "read" or view this file just like I might a non-binary file? I am running... (2 Replies)
Discussion started by: dsimpg1
2 Replies

5. Linux

Viewing user accound information

How can dump the user account detail? like how long need to change password, password naming policy, how many times will lock account if login failed.. thk a lot (1 Reply)
Discussion started by: zp523444
1 Replies

6. UNIX for Dummies Questions & Answers

Viewing Ebcidic files

I am having trouble viewing these files from my unix session. vi comes back with line too long. Also an m_dump with the relevant dml comes back with problems. How can I view this as a text file? Also is there an easy way to view specific records within. Eg I have a policy id (4 Replies)
Discussion started by: trek88
4 Replies

7. UNIX for Dummies Questions & Answers

GNU Screen - viewing hardcopy (binary)

I generate a hardcopy (C-a h) of an ncurses screen which has some formatting on it (boxes, highlights). If I "cat" the file, i get only text. If I do a cat hardcopy.n | less , then i see a lot of control characters where the boxes are. most hardcopy.n shows me a hexdump of the file. less... (0 Replies)
Discussion started by: sentinel
0 Replies

8. HP-UX

BOGGLED!! User information incorrect when viewing "ps" Process Status

Hello Anyone: I have run into an issue that I have never seen or heard of. Recently on a specific server I have encountered a random issue that I've not been able to repliate on demand... When I view the processes status of a certain process, the information returned to the screen has a... (2 Replies)
Discussion started by: DEN1022
2 Replies

9. Shell Programming and Scripting

Help with viewing the Log files

I have a file name as logfiles_tar.tgz. How can I view the contents of the log files present in logfiles_tar.tgz ? Any help would be really appreciated. Thanks (3 Replies)
Discussion started by: bobby1015
3 Replies
pydhcp(8)							     PYDHCPLIB								 pydhcp(8)

NAME
pydhcp - a dhcp command line tool USAGE
pydhcp --input <TYPE;OPTIONS;NAME> --output <TYPE;OPTIONS;NAME> DESCRIPTION
pydhcp is a command line tool to read or write dhcp packet on network, and translate from raw data to human readable informations (and vice-et-versa). pydhcp is a part of the pydhcplib python library. Input and Output field description pydhcp takes an input and an output argument. Input and output are described in the same way. For example : pydhcp --input 'device;binary|up;eth0:68' --output 'file;readable;myfile.txt' -c 1 <TYPE> field There is 5 types for the <TYPE> field. Only one type at once can be used : device, address, file, stdin and stdout. device tells pydhcp to write or listen directly on the network interface and port. address is to write or listen on a specific Internet Address and port (like 192.168.1.1:67 ). file read or write data from or to a file. stdin read data from stdin, stdout write data on stdout. <OPTIONS> field You can use multiple options in the option field by separate them with a pipe |. There is 4 options for this field : readable, binary, up and noup. readable id to read or write data in a human readable language : a packet definition language. This language is described later. Binary form stand for reading or writing packets in the same binary form they are on the network : an UDP packet. readable and binary are mutually exclusive. Option up tells pydhcp to set the network interface up if not. noup tells not to set up the interface. up and noup are only useful in combination with the device type. Default is noup. <NAME> field Describe the name of the device (eth0:67,wlan0:client) , the address (192.168.1.1), or the filename (foo.txt). You can use a port number or the keywords client and server for standard dhcp port. Other command line options of pydhcp Option -c : Number of packet to read or write. 0 for unlimited number of packet. Default is 0. Known limitations - Only one dhcp packet per file, then count is set to 1 for file I/O - No readable transfert on network (address or device). Binary only. -c|--count Number of packets to process. EXAMPLES
Read a client packet on any address and write it on a human readable file : pydhcp -i "address;binary;0.0.0.0:67" -o "file;readable;myfile.bin" Read a binary dhcp packet from a file and print it on stdout in a human readable form : pydhcp -i "file;binary;myfile.bin" -o "stdout;readable;" SEE ALSO
pydhcplib BUGS
Many... AUTHOR
Mathieu Ignacio (mignacio[AT]april.org) pydhcp(8)
All times are GMT -4. The time now is 03:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy