HEXDUMP

Section: User Commands (1)
Index
Return to Main Contents

BSD mandoc
 

NAME

hexdump - ascii, decimal, hexadecimal, octal dump  

»ç¿ë¹ý

hexdump [-bcdovx ] [-e format_string ] [-f format_file ] [-n length ] -words [-s skip ] file ...  

¼³¸í

hexdump Ç®±×¸²Àº ÁöÁ¤ÇÑ ÆÄÀÏ, ¶Ç´Â Ç¥ÁØ ÀÔ·ÂÀ¸·Î ºÎÅÍ ÀÔ·ÂµÈ °ÍÀ» »ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ Çü½ÄÀ¸·Î º¸¿©ÁÖ´Â ¿¬ÀåƲÀÌ´Ù.

»ç¿ëÇÒ ¼ö ÀÖ´Â ¿É¼ÇÀº ´ÙÀ½°ú °°´Ù:

-b
8Áø¼ö 1 ¹ÙÀÌÆ®¾¿ º¸±â. ÀÔ·ÂµÈ ÆÄÀÏÀÇ ³»¿ëÀ» ¼¼ÀÚ¸® ¾¿ ÇÑÁÙ¿¡ 16°³·Î ³ª´©¿ö 8Áø¼ö·Î º¸¿©ÁØ´Ù.
-c
ij¸¯ÅÍ 1 ¹ÙÀÌÆ®¾¿ º¸±â. ÀÔ·ÂµÈ ÆÄÀÏÀÇ ³»¿ëÀ» ¼¼ÀÚ¸® ¾¿ ÇÑÁÙ¿¡ 16°³·Î ³ª´©¿ö ¹®ÀÚÇü½ÄÀ¸·Î º¸¿©ÁØ´Ù. ¹®ÀÚÇü½ÄÀÌ ¾Æ´Ñ ¹®ÀÚ´Â ¼¼ÀÚ¸® 8Áø¼ö·Î º¸¿©ÁØ´Ù.
-d
10Áø¼ö 2 ¹ÙÀÌÆ®¾¿ º¸±â. ÀÔ·ÂµÈ ÆÄÀÏÀÇ ³»¿ëÀ» ´Ù¼¸ÀÚ¸® ¾¿ ÇÑÁÙ¿¡ 8°³·Î ³ª´©¿ö 10Áø¼ö·Î º¸¿©ÁØ´Ù.
-e format_string
º¸¿©ÁÙ Çü½ÄÀ» format_string Çü½ÄÀ¸·Î ÁöÁ¤ÇÑ´Ù.
-f format_file
º¸¿©ÁÙ Çü½ÄÀÌ Çϳª ¶Ç´Â ±× ÀÌ»óÀÇ ÁÙ·Î ³ª´µ¾îÁø ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. ºñ¿©ÀÖ´Â ÁÙ, # ±ÛÀÚ·Î ½ÃÀÛÇÏ´Â ÁÙÀº ¹«½ÃµÈ´Ù.
-n length
ÀÔ·ÂµÈ ÆÄÀÏÀÇ length ¹ÙÀÌÆ®¸¸ º¸¿©ÁØ´Ù.
-o
8Áø¼ö 2 ¹ÙÀÌÆ®¾¿ º¸±â. ÀÔ·ÂµÈ ÆÄÀÏÀÇ ³»¿ëÀ» ¿©¼¸ÀÚ¸® ¾¿ ÇÑÁÙ¿¡ 8°³·Î ³ª´©¿ö 8Áø¼ö·Î º¸¿©ÁØ´Ù.
-s offset
ÀÔ·Â ÆÄÀÏÀÇ Ã³À½ºÎÅÍ offset ÆÄÀÌÆ®¸¦ Åë°úÇÏ°í º¸¿©ÁØ´Ù. offset »ç¿ëÇÒ ¼ýÀÚ´Â ÃʱⰪÀ¸·Î 10Áø¼ö À̸ç, 0x ³ª 0X ·Î ½ÃÀÛÇÏ´Â ¼ýÀÚ´Â 16Áø¼ö·Î ó¸®ÇÑ´Ù. 0 À¸·Î ½ÃÀÛÇÏ´Â ¼ýÀÚ´Â 8Áø¼ö. ¶ÇÇÑ ¼ýÀÚ ³¡¿¡ b k m ¹®ÀÚ°¡ ¿Ã ¼ö Àִµ¥, ÀÌ°ÍÀº °¢°¢ 512 1024 1048576 ¹ÙÀÌÆ®¸¦ ÀǹÌÇÑ´Ù.
-v
ÀÌ ¿É¼ÇÀº ¸ðµç ÀÔ·Â ÀڷḦ º¸¿©ÁØ´Ù. Without the -v option, any number of groups of output lines, which would be identical to the immediately preceding group of output lines (except for the input offsets), are replaced with a line comprised of a single asterisk.
-x
16Áø¼ö 2¹ÙÀÌÆ®¾¿ º¸±â. ÀÔ·ÂµÈ ÆÄÀÏÀÇ ³»¿ëÀ» 4ÀÚ¸®¾¿ ÇÑÁÙ¿¡ 8°³·Î ³ª´©¿ö º¸¿©ÁØ´Ù.

°¢ ÀÔ·Â ÆÄÀÏÀ» À§ÇØ, hexdump ¸í·ÉÀº °¢°¢ Ç¥ÁØ Ãâ·ÂÀ¸·Î ¿¬¼ÓÀûÀ¸·Î º¹»çÇÑ´Ù. ±×¸®°í, -e ¶Ç´Â -f ¿É¼ÇÀÌ »ç¿ëµÇ°í ÀÖÀ¸¸é, ÁöÁ¤ÇÑ Ãâ·Â ¾ç½Ä¿¡ µû¶ó ÀԷµǴ ÀڷḦ º¯È¯ÇÑ´Ù.  

Formats

Æ÷¸ä ¹®ÀÚ¿­Àº °ø¹é¹®ÀÚ·Î ±¸ºÐµÇ´Â ¿©·¯°³ÀÇ Æ÷¸ä À¯´ÖÀ» °¡Áø´Ù. ÇϳªÀÇ Æ÷¸ä À¯´ÖÀº ¼¼ ºÎºÐÀ¸·Î ±¸¼ºµÈ´Ù. ¹Ýº¹È½¼ö, ¹ÙÀÌÆ® Ƚ¼ö, Æ÷¸ä Çü½ÄÀÌ´Ù.

¹Ýº¹È½¼ö´Â ¼±ÅÃÀûÀÎ ¾ç¼ö Á¤¼öÀ̸ç, ÃʱⰪÀº 1ÀÌ´Ù. °¢°¢ÀÇ Æ÷¸äÀº ÀÌ È½¼ö¸¸Å­ Àû¿ëµÈ´Ù.

¹ÙÀÌÆ® Ƚ¼ö´Â ¼±ÅÃÀûÀÎ ¾ç¼ö Á¤¼öÀ̸ç, ÀÌ °ªÀÌ Á¤ÇØÁö¸é, ÀÌ ¹ÙÀÌÆ® ¸¸Å­ º¯È­Çϸé, ¹Ýº¹È½¼ö¸¦ ÀÐ¾î ¶Ç ÀÌ ¹ÙÀÌÆ®¸¸Å­ º¯È¯ÇÑ´Ù.

¹Ýº¹È½¼ö¿Í ¹ÙÀÌÆ® Ƚ¼ö°¡ µÑ´Ù »ç¿ëµÇ¸é, ½½·¡½¬(/)·Î ±¸ºÐÇÑ´Ù. ½½·¡½¬ ¾ÕµÚÀÇ ¾î¶°ÇÑ °ø¹é¹®ÀÚµµ ¸ðµÎ ¹«½ÃµÈ´Ù.

Æ÷¸äÀº µû¿òÇ¥(" ")·Î ¹­°ÜÁ®¾ß ÇÑ´Ù. Æ÷¸äÀº fprintf ÇÔ¼ö( fprintf(3)) ¿¡¼­ »ç¿ëÇÏ´Â °Í°ú ºñ½ÁÇÏ´Ù.

Hexdump¿¡¼­´Â ºÎ°¡ÀûÀ¸·Î ´ÙÀ½ º¯È¯ ¹®Àڵ鵵 Áö¿øÇÑ´Ù.

_a [dox ]
Display the input offset, cumulative across input files, of the next byte to be displayed. The appended characters d o and x specify the display base as decimal, octal or hexadecimal respectively.
_A [dox ]
Identical to the _a conversion string except that it is only performed once, when all of the input data has been processed.
_c
Output characters in the default character set. Nonprinting characters are displayed in three character, zero-padded octal, except for those representable by standard escape notation (see above), which are displayed as two character strings.
_p
Output characters in the default character set. Nonprinting characters are displayed as a single ``. ''
_u
Output US ASCII characters, with the exception that control characters are displayed using the following, lower-case, names. Characters greater than 0xff, hexadecimal, are displayed as hexadecimal strings.

000 nul 001 soh 002 stx 003 etx 004 eot 005 enq
006 ack 007 bel 008 bs 009 ht 00A lf 00B vt
00C ff 00D cr 00E so 00F si 010 dle 011 dc1
012 dc2 013 dc3 014 dc4 015 nak 016 syn 017 etb
018 can 019 em 01A sub 01B esc 01C fs 01D gs
01E rs 01F us 0FF del

The default and supported byte counts for the conversion characters are as follows:

%_c , %_p , %_u , %c
One byte counts only.
%d , %i , %o %u , %X , %x
Four byte default, one, two and four byte counts supported.
%E , %e , %f %G , %g
Eight byte default, four byte counts supported.

The amount of data interpreted by each format string is the sum of the data required by each format unit, which is the iteration count times the byte count, or the iteration count times the number of bytes required by the format if the byte count is not specified.

The input is manipulated in ``blocks'', where a block is defined as the largest amount of data specified by any format string. Format strings interpreting less than an input block's worth of data, whose last format unit both interprets some number of bytes and does not have a specified iteration count, have the iteration count incremented until the entire input block has been processed or there is not enough data remaining in the block to satisfy the format string.

If, either as a result of user specification or hexdump modifying the iteration count as described above, an iteration count is greater than one, no trailing whitespace characters are output during the last iteration.

It is an error to specify a byte count as well as multiple conversion characters or strings unless all but one of the conversion characters or strings is _a or _A

If, as a result of the specification of the -n option or end-of-file being reached, input data only partially satisfies a format string, the input block is zero-padded sufficiently to display all available data (i.e. any format units overlapping the end of data will display some number of the zero bytes).

Further output by such format strings is replaced by an equivalent number of spaces. An equivalent number of spaces is defined as the number of spaces output by an s conversion character with the same field width and precision as the original conversion character or conversion string but with any ``+ '' `` '' ``# '' conversion flag characters removed, and referencing a NULL string.

If no format strings are specified, the default display is equivalent to specifying the -x option.

hexdump exits 0 on success and >0 if an error occurred.  

EXAMPLES

Display the input in perusal format:
"%06.6_ao "  12/1 "%3_u "
"\t\t" "%_p "
"\n"

Implement the -x option:

"%07.7_Ax\n"
"%07.7_ax  " 8/2 "%04x " "\n"
 

°ü·Ã Ç׸ñ

adb(1)


 

Index

NAME
»ç¿ë¹ý
¼³¸í
Formats
EXAMPLES
°ü·Ã Ç׸ñ

This document was created by man2html, using the manual pages.
Time: 08:06:57 GMT, March 25, 2004