Page 1 of 1 [ 14 posts ] 

LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 31
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

28 Jan 2010, 6:13 pm

If you want to get the binary code for a file, say an image or an application, you can type "hexdump -C " and then the filename in the terminal. This will display the machine code in hex. Other options include -o for displaying in octal and -d for displaying in decimal.



Vexcalibur
Veteran
Veteran

User avatar

Joined: 17 Jan 2008
Age: 36
Gender: Male
Posts: 5,398

28 Jan 2010, 6:29 pm

Not really useless ^ ^


_________________
.


LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 31
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

28 Jan 2010, 6:57 pm

Vexcalibur wrote:
Not really useless ^ ^


Do you know what it's used for? To me it just looks sort of like the goto statement, included because it gives you more power, but doesn't have much practical value.



Vexcalibur
Veteran
Veteran

User avatar

Joined: 17 Jan 2008
Age: 36
Gender: Male
Posts: 5,398

28 Jan 2010, 7:00 pm

One day, you may have to deal with binary files in a remote server through ssh. Hex is one of the few fews to really get to see what's going on with them.

If this happens to you, remember me. I once had to use it, that's all I am saying.


_________________
.


righton
Blue Jay
Blue Jay

User avatar

Joined: 2 Dec 2009
Age: 35
Gender: Male
Posts: 84

28 Jan 2010, 7:19 pm

The xxd utility is similar.

It's not useless; it's extremely useful for reading data containing non-ASCII content, such as HL7 messages. 8)



Keith
Veteran
Veteran

User avatar

Joined: 12 Aug 2008
Age: 37
Gender: Male
Posts: 2,321
Location: East Sussex, UK

28 Jan 2010, 7:46 pm

If you don't use it. It's useless. If you know what it is and know how to use it. It can be a "I need this to live" utility



LittleTigger
Veteran
Veteran

User avatar

Joined: 5 Nov 2009
Age: 52
Gender: Male
Posts: 814

28 Jan 2010, 8:08 pm

It sounds interesting.

O COOL I just tried it I can see
inside any regular file, that kicks butt.


_________________
A Boy And His Cat

When society stops expecting
too much from me, I will
stop disappointing them.


righton
Blue Jay
Blue Jay

User avatar

Joined: 2 Dec 2009
Age: 35
Gender: Male
Posts: 84

28 Jan 2010, 11:04 pm

btw, if you want to see the (usually-hidden) structure of a UNIX directory, try "cat /path/ | xxd". (This does NOT work on Linux, definitely works on AIX, not sure about others.)



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 72
Gender: Male
Posts: 9,608
Location: Somerset UK

29 Jan 2010, 8:52 am

dd is OK, as is od.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 31
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

29 Jan 2010, 12:07 pm

Okay, I'm confused here. How do you "read" hexadecimal binary code?



pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 63
Gender: Male
Posts: 7,015

29 Jan 2010, 12:13 pm

hex would actually be data. It's just a lot easier to follow than binary...;)

When you're doing IP arithmetic (especially for figuring out subnet masks), it could be handy.


_________________
anahl nathrak, uth vas bethude, doth yel dyenvey...


jbtamug99
Emu Egg
Emu Egg

User avatar

Joined: 30 Jan 2010
Age: 43
Gender: Male
Posts: 5

01 Feb 2010, 5:07 am

Keith wrote:
If you don't use it. It's useless. If you know what it is and know how to use it. It can be a "I need this to live" utility


What he said! *nods*


_________________
AS score: 128 of 200 / NT score: 79 of 200


Fuzzy
Veteran
Veteran

User avatar

Joined: 30 Mar 2006
Age: 48
Gender: Male
Posts: 5,223
Location: Alberta Canada

01 Feb 2010, 5:22 am

LordoftheMonkeys wrote:
Okay, I'm confused here. How do you "read" hexadecimal binary code?


Hexadecimal and binary are two different systems.

Hex isnt that hard to read, in fact, its more efficient than decimal.


_________________
davidred wrote...
I installed Ubuntu once and it completely destroyed my paying relationship with Microsoft.


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 63
Gender: Male
Posts: 7,015

02 Feb 2010, 12:01 am

well, they're just different bases; f is easier to keep track of than 1111...;)
numbers is numbers...


_________________
anahl nathrak, uth vas bethude, doth yel dyenvey...