Adam Funk wrote:
> ``dpkg -l'' on its own in a terminal produces wide output, e.g.:
> [...]
> but when I send its output to a pipe or a file, I get narrow
> output:
I thought dpkg -l used COLUMNS or the current tty columns to base its
output. Which makes me think you have set 'COLUMNS=200 dpkg -l', which
is something I do.
> I want to dump a complete list of installed packages to a file as
> part of my backup procedure. man dpkg-query suggests using
> --showformat=format, in particular: "Package information can be
> included by inserting variable references to package fields using
> the ${var[;width]} syntax." But it doesn't say what the variable
> names are. Suggestions?
I would backup /var/backups. That directory includes a copy of the
dpkg status file and a few other tidbits from the system. From that
you can recreate your system. I use my own script to parse the data.
I can post that if there is interest. It is simple. I would also
save /var/cache/debconf but it is not as critical.
Bob
Attachment:
pgp_RaUmuk8pU.pgp
Description: PGP signature