LinuxQuestions.org
Review your favorite Linux distribution.
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 01-18-2013, 02:47 AM   #1
mtwollet
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Rep: Reputation: 0
linux hexedit layout trying to understand


hi there , I was wondering the following if someone could clarify please.

i was trying to understand the layout of hexedit pertaining to the following that a user would see on screen. sorry if formatting is messed up, im doing it on a netbook.

00000000 FA B8 00 10 8E D0 BC 00 B0 B8 00 00 8E D8 8E C0 FB BE 00 7C ...................|
00000014 BF 00 06 B9 00 02 F3 A4 EA 21 06 00 00 BE BE 07 38 04 75 0B .........!......8.u.
00000028 83 C6 10 81 FE FE 07 75 F3 EB 16 B4 02 B0 01 BB 00 7C B2 80 .......u.........|..

such as why is the left hand column in hexedit list its hex values by order of 20 in decimal.

such as
00000000
00000014
00000028

but if you launch hexedit with the -s switch the left column the values for each line is multiples of 16,
such as

00000010
00000020
00000030

is this because hex is a base 16 system. sorry for such a dumb question, I was interested in finding a distinct reason for the way hexedit is lay'd out if possible as well as why a standard view of hexedit shows the data in hex in columns of 5.

such as

D5 4F 05 0000 00 00 2021 00 07 1A3B 1F 00 08 00 00 00 98

thank you.

I hope my question is understandable.

Last edited by mtwollet; 01-18-2013 at 02:51 AM. Reason: change
 
Old 01-18-2013, 04:39 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
That "hex is a base 16 system" doesn't follow that it should groups successive bytes by 16. It is unrelated. It depends on what structure you want to see. For example someone want to see a data with array of integers and one char, and grouping by 5 or 10 would be very helpful. The default behavior is not to display 5 columns, but maximize the view. For example in my terminal with 170 columns I see by default 9 groups of 4 bytes in one row.
 
Old 01-18-2013, 07:22 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
most of the time , for most binary files. there is no "real" human readable info
however there are some people that are rather fluent in reading it

so most of the time there is really nothing for most people to "read" in hexedit

now there are always exceptions
an ordered binary data set

or what i read mostly in a hex editor
the 3d model format "*.3ds" and the (binary) "*.cmod" meshes

there is plain test in them


Quote:

such as
00000000
00000014
00000028
lines of code
it is basically the line number ( in blocks of code)

depending on just what hex editor one is using the window can be a bit different but mostly it is like this

3 sections
left is the "number of blocks"
middle -- THIS IS CHANGEABLE
-- the format can be --
1)Hexadecimal --base 16
2)decimal --base 10
3)binary --base 2
4)octal --base 8

and the right
sort of ? kind of ? maybe ? human readable plain text
here is a screen capture of reading a 3ds 3d mesh
on the right you can see some of the plain text words
http://imgbox.com/acxEuz16
 
Old 01-18-2013, 07:45 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by mtwollet View Post
i was trying to understand the layout of hexedit
The default layout depends on the width of the terminal window that you are running it in.

I'm not sure of the rules for the -s layout.

You seem to be asking a simple question in a complicated way, so I might have misunderstood your question. If I have (and the other answers above also don't explain what you need) try asking more clearly.

But try changing the width of the terminal window and rerunning hexedit and see what is different. That experiment may tell you more than we can explain.
 
  


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
Fedora13 - KDE 4.4.5, KXKB won't change layout if particular layout is selected CzarEjey Linux - Desktop 0 09-03-2010 03:12 AM
get Keyboard Layout on Linux? tuanphan Linux - Software 1 05-15-2007 04:07 AM
Switching keyboard layout - Mandriva2006 - K.D.E. Windows Layout! itz2000 Mandriva 3 08-13-2006 07:43 PM
Linux filesystem layout Nic-MDKman Linux - General 6 08-13-2006 05:50 AM
Help me understand linux! Sideburnz Linux - Newbie 12 03-29-2006 04:37 PM


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