uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

xdump(USP)

Name

xdump : Displays a hexadecimal dump of a file

Synopsis

Usage   : xdump [-vlcn] [<n>...] <file>

Version : Tue Jan  9 09:02:34 JST 2024

Edition : 1

Description

The xdump command displays a hexadecimal dump of the specified file.

If <file> is omitted or specified as "-" then the command reads from

standard input.

Example 1

By default, 16 characters per line are displayed.

$ cat data

12345678901234567890

$ xdump data

31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36

37 38 39 30 0A

Example 2

You can specify any number of characters per line to dump.  In this

example, we dump 10 characters per line.

This makes it easy to read when viewing a fixed-width file.

$ xdump 10 data

31 32 33 34 35 36 37 38 39 30

31 32 33 34 35 36 37 38 39 30

0A

Example 3

Dump 5 characters, then 3 characters, then 4 characters.

Makes it easy to dump each field separately for fixed-width files.

$ xdump 5 3 4 data

31 32 33 34 35

36 37 38

39 30 31 32

33 34 35 36 37

38 39 30

0A

Example 4

The -v option causes the ASCII equivalent to be displayed on the

right-hand side.

Multi-byte characters cannot be displayed.  Non-printable characters

are displayed as ".".

$ xdump -v 10 data

31 32 33 34 35 36 37 38 39 30 : 1234567890

31 32 33 34 35 36 37 38 39 30 : 1234567890

0A : .

Example 5

The -l option displays line numbers on each line.

This is convenient when displaying fixed-width data.

$ xdump -l 10 data

00000001 : 31 32 33 34 35 36 37 38 39 30

00000002 : 31 32 33 34 35 36 37 38 39 30

00000003 : 0A

Example 6

The -l option displays line numbers.

If you also specify multiple settings for characters per line,

field numbers are appended to the line numbers as follows:

$ xdump -l 5 3 4 data

00000001-00001 : 31 32 33 34 35

00000001-00002 : 36 37 38

00000001-00003 : 39 30 31 32

00000002-00001 : 33 34 35 36 37

00000002-00002 : 38 39 30

00000002-00003 : 0A

Example 7

The -c option displays the character position of the first character

on each line.

$ xdump -c 10 data

0000000001 : 31 32 33 34 35 36 37 38 39 30  <- 1st character

0000000011 : 31 32 33 34 35 36 37 38 39 30  <- 11th character

0000000021 : 0A                     <- 21st character

Example 8

The -n option displays all characters on the same line until it

encounters a linefeed (0A).

If this is specifed, <n>... is ignored.

$ cat data2

abc

12345

$ xdump -n data2

61 62 63 0A

31 32 33 34 35 0A