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
59       Note that "[ ... ]" are separate parameters, and must be surrounded by
60       spaces.  "--" separates nbddump parameters from subprocess parameters.
61

OPTIONS

63       --help
64           Display brief command line help and exit.
65
66       --color
67       --colour
68       --no-color
69       --no-colour
70           Enable or disable ANSI colours in output.  By default we use
71           colours if the output seems to be a terminal, and disable them if
72           not.
73
74       --length=N
75       -n N
76           Dump up to N bytes and then stop.
77
78       -V
79       --version
80           Display the package name and version and exit.
81

SEE ALSO

83       libnbd(3), nbdcopy(1), nbdfuse(1), nbdinfo(1), nbdsh(1), hexdump(1),
84       file(1), qemu-img(1), nbdkit(1), qemu-nbd(8).
85

AUTHORS

87       Richard W.M. Jones
88
90       Copyright (C) 2022 Red Hat Inc.
91

LICENSE

93       This library is free software; you can redistribute it and/or modify it
94       under the terms of the GNU Lesser General Public License as published
95       by the Free Software Foundation; either version 2 of the License, or
96       (at your option) any later version.
97
98       This library is distributed in the hope that it will be useful, but
99       WITHOUT ANY WARRANTY; without even the implied warranty of
100       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
101       Lesser General Public License for more details.
102
103       You should have received a copy of the GNU Lesser General Public
104       License along with this library; if not, write to the Free Software
105       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
106       02110-1301 USA
107
108
109
110libnbd-1.14.2                     2023-01-03                        nbddump(1)
Impressum