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