blob: f010a9dbb4d3cbd2b0999ff81a8fbe04d943e0d2 [file] [log] [blame]
Roger Knechtf841bb82022-09-03 13:15:04 +00001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt1b0c3162024-01-14 14:53:13 +01003.. index::
4 single: xxd (command)
5
Roger Knechtf841bb82022-09-03 13:15:04 +00006xxd command
Heinrich Schuchardtb72160b2023-10-28 11:59:32 +02007===========
Roger Knechtf841bb82022-09-03 13:15:04 +00008
9Synopsis
10--------
11
12::
13
14 xxd <interface> <dev[:part]> <file>
15
16Description
17-----------
18
19The xxd command prints the file content as hexdump to standard out.
20
21interface
22 interface for accessing the block device (mmc, sata, scsi, usb, ....)
23
24dev
25 device number
26
27part
28 partition number, defaults to 1
29
30file
31 path to file
32
33Example
34-------
35
36Here is the output for a example text file:
37
38::
39
40 => xxd mmc 0:1 hello
41 00000000: 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a 00 01 02 03 hello world.....
42 00000010: 04 05 ..
43 =>
44
45Configuration
46-------------
47
48The xxd command is only available if CONFIG_CMD_XXD=y.
49
50Return value
51------------
52
53The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code.