Long lines listing dpkg
I use to store a list of packages previous to an update and before it in order to mantain documentation about the changes made to each system I administer.
To do this I use to dump the following information prior and before the upgrade of packages:
The problem is that dpkg -l shows the result well under console shell but cuts the output to 80 columns when the output of the command is redirected to a file.
To solve it is so easy, you only need to change the following environment variable to a value greater than 80 with a command like that:
That give us the report without that column shrink
To do this I use to dump the following information prior and before the upgrade of packages:
- ls -l /var/cache/apt/archives
- dpkg -l
The problem is that dpkg -l shows the result well under console shell but cuts the output to 80 columns when the output of the command is redirected to a file.
To solve it is so easy, you only need to change the following environment variable to a value greater than 80 with a command like that:
# export COLUMNS=120
# dpkg -l > dpkg_l.list
That give us the report without that column shrink
0 Comments:
Post a Comment
<< Home