.\" Automatically generated by Pandoc 2.17.1.1
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "bup-cat-file" "1" "2025-02-02" "Bup 0.33.7" ""
.hy
.SH NAME
.PP
bup-cat-file - extract archive content (low-level)
.SH SYNOPSIS
.PP
bup cat-file [--meta|--bupm] <\f[I]path\f[R]>
.SH DESCRIPTION
.PP
\f[V]bup cat-file\f[R] extracts content associated with \f[I]path\f[R]
from the archive and dumps it to standard output.
If nothing special is requested, the actual data contained by
\f[I]path\f[R] (which must be a regular file) will be dumped.
.SH OPTIONS
.TP
--meta
retrieve the metadata entry associated with \f[I]path\f[R].
Note that currently this does not return the raw bytes for the entry
recorded in the relevant .bupm in the archive, but rather a decoded and
then re-encoded version.
When that matters, it should be possible (though awkward) to use
\f[V]--bupm\f[R] on the parent directory and then find the relevant
entry in the output.
.TP
--bupm
retrieve the .bupm file associated with \f[I]path\f[R], which must be a
directory.
.SH EXAMPLES
.IP
.nf
\f[C]
# Retrieve the content of somefile.
$ bup cat-file /foo/latest/somefile > somefile-content

# Examine the metadata associated with something.
$ bup cat-file --meta /foo/latest/something | bup meta -tvvf -

# Examine the metadata for somedir, including the items it contains.
$ bup cat-file --bupm /foo/latest/somedir | bup meta -tvvf -
\f[R]
.fi
.SH SEE ALSO
.PP
\f[V]bup-join\f[R](1), \f[V]bup-meta\f[R](1)
.SH BUP
.PP
Part of the \f[V]bup\f[R](1) suite.
.SH AUTHORS
Rob Browning <rlb@defaultvalue.org>.