.\" Automatically generated by Podwrapper::Man 1.14.2 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "nbddump 1" .TH nbddump 1 "2023-01-04" "libnbd-1.14.2" "LIBNBD" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" nbddump \- hexdump the content of a disk over NBD .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& nbddump NBD .Ve .PP \&\f(CW\*(C`NBD\*(C'\fR is an \s-1NBD URI\s0 or subprocess: .PP .Vb 2 \& NBD := nbd://... | nbd+unix:// (or other URI formats) \& | [ CMD ARGS ... ] .Ve .PP .Vb 1 \& nbddump \-\-help .Ve .PP .Vb 1 \& nbddump \-\-version .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" nbddump prints the content of a disk from an \s-1NBD\s0 server using the usual hexdump format: .PP .Vb 8 \& $ nbddump nbd://localhost \& 0000: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│ \& 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│ \& ☆ \& 0100: 68 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 00 00 00 │hello, world!···│ \& 0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │················│ \& ☆ \& 1000: 00 00 00 21 │···! │ .Ve .SS "Output format" .IX Subsection "Output format" The first field (before the \f(CW\*(C`:\*(C'\fR) is the offset within the file, in hexadecimal. .PP The second field shows the hex codes of bytes read from the file. .PP The third field shows the \s-1ASCII\s0 equivalent characters (if printable). .PP A splat character (\f(CW\*(C`☆\*(C'\fR) indicates lines of repeated output which have been squashed. (Note this is not just for lines of zero bytes, but any case where the next line shown would be the same as the previous line.) .SS "Subprocess" .IX Subsection "Subprocess" nbddump can also run an \s-1NBD\s0 server as a subprocess. This requires an \&\s-1NBD\s0 server which understands systemd socket activation, such as \&\fBqemu\-nbd\fR\|(8) or \fBnbdkit\fR\|(1). .PP For example, to dump out a qcow2 file as raw data: .PP .Vb 1 \& nbddump \-\- [ qemu\-nbd \-r \-f qcow2 file.qcow2 ] .Ve .PP To dump out an empty floppy disk created by \fBnbdkit\-floppy\-plugin\fR\|(1): .PP .Vb 2 \& mkdir /var/tmp/empty \& nbddump \-\- [ nbdkit floppy /var/tmp/empty ] .Ve .PP Note that \f(CW\*(C`[ ... ]\*(C'\fR are separate parameters, and must be surrounded by spaces. \f(CW\*(C`\-\-\*(C'\fR separates nbddump parameters from subprocess parameters. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-help\fR" 4 .IX Item "--help" Display brief command line help and exit. .IP "\fB\-\-color\fR" 4 .IX Item "--color" .PD 0 .IP "\fB\-\-colour\fR" 4 .IX Item "--colour" .IP "\fB\-\-no\-color\fR" 4 .IX Item "--no-color" .IP "\fB\-\-no\-colour\fR" 4 .IX Item "--no-colour" .PD Enable or disable \s-1ANSI\s0 colours in output. By default we use colours if the output seems to be a terminal, and disable them if not. .IP "\fB\-\-length=\fRN" 4 .IX Item "--length=N" .PD 0 .IP "\fB\-n\fR N" 4 .IX Item "-n N" .PD Dump up to \fIN\fR bytes and then stop. .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Display the package name and version and exit. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlibnbd\fR\|(3), \&\fBnbdcopy\fR\|(1), \&\fBnbdfuse\fR\|(1), \&\fBnbdinfo\fR\|(1), \&\fBnbdsh\fR\|(1), \&\fBhexdump\fR\|(1), \&\fBfile\fR\|(1), \&\fBqemu\-img\fR\|(1), \&\fBnbdkit\fR\|(1), \&\fBqemu\-nbd\fR\|(8). .SH "AUTHORS" .IX Header "AUTHORS" Richard W.M. Jones .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2022 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This library is distributed in the hope that it will be useful, but \s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 Lesser General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA 02110\-1301 USA\s0