1nbddump(1)                          LIBNBD                          nbddump(1)
2
3
4

NAME

6       nbddump - hexdump the content of a disk over NBD
7

SYNOPSIS

9        nbddump NBD
10
11       "NBD" is an NBD URI or subprocess:
12
13        NBD := nbd://... | nbd+unix:// (or other URI formats)
14             | [ CMD ARGS ... ]
15
16        nbddump --help
17
18        nbddump --version
19

DESCRIPTION

21       nbddump prints the content of a disk from an NBD server using the usual
22       hexdump format:
23
24        $ nbddump nbd://localhost
25        0000: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│
26        0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│
27
28        0100: 68 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 00 00 00 │hello, world!···│
29        0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│
30
31        1000: 00 00 00 21                                     │···!            │
32
33   Output format
34       The first field (before the ":") is the offset within the file, in
35       hexadecimal.
36
37       The second field shows the hex codes of bytes read from the file.
38
39       The third field shows the ASCII equivalent characters (if printable).
40
41       A splat character ("☆") indicates lines of repeated output which have
42       been squashed.  (Note this is not just for lines of zero bytes, but any
43       case where the next line shown would be the same as the previous line.)
44
45   Subprocess
46       nbddump can also run an NBD server as a subprocess.  This requires an
47       NBD server which understands systemd socket activation, such as
48       qemu-nbd(8) or nbdkit(1).
49
50       For example, to dump out a qcow2 file as raw data:
51
52        $ nbddump -- [ qemu-nbd -r -f qcow2 file.qcow2 ]
53
54       To dump out an empty floppy disk created by nbdkit-floppy-plugin(1):
55
56        $ mkdir /var/tmp/empty
57        $ nbddump -- [ nbdkit floppy /var/tmp/empty ]
58        0000: 00 00 00 4d 53 57 49 4e 34 2e 31 00 00 00 00 00 |...MSWIN4.1.....|
59        0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
60
61        01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe |................|
62        01c0: ff ff 0c fe ff ff 00 08 00 00 80 00 00 00 00 00 |................|
63
64       To dump out some test data using nbdkit-data-plugin(1):
65
66        $ nbddump -- [ nbdkit data ' @0x1000 "hello!" ' ]
67        0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│
68
69        1000: 68 65 6c 6c 6f 21                               │hello!          │
70
71       Note that "[ ... ]" are separate parameters, and must be surrounded by
72       spaces.  "--" separates nbddump parameters from subprocess parameters.
73

OPTIONS

75       --help
76           Display brief command line help and exit.
77
78       --color
79       --colour
80       --no-color
81       --no-colour
82           Enable or disable ANSI colours in output.  By default we use
83           colours if the output seems to be a terminal, and disable them if
84           not.
85
86       --length=N
87       -n N
88           Dump up to N bytes and then stop.
89
90       -V
91       --version
92           Display the package name and version and exit.
93

SEE ALSO

95       libnbd(3), nbdcopy(1), nbdfuse(1), nbdinfo(1), nbdsh(1), hexdump(1),
96       file(1), qemu-img(1), nbdkit(1), qemu-nbd(8).
97

AUTHORS

99       Richard W.M. Jones
100
102       Copyright Red Hat
103

LICENSE

105       This library is free software; you can redistribute it and/or modify it
106       under the terms of the GNU Lesser General Public License as published
107       by the Free Software Foundation; either version 2 of the License, or
108       (at your option) any later version.
109
110       This library is distributed in the hope that it will be useful, but
111       WITHOUT ANY WARRANTY; without even the implied warranty of
112       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
113       Lesser General Public License for more details.
114
115       You should have received a copy of the GNU Lesser General Public
116       License along with this library; if not, write to the Free Software
117       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
118       02110-1301 USA
119
120
121
122libnbd-1.16.5                     2023-09-26                        nbddump(1)
Impressum