[sf-lug] NEED INFO ABOUT BOOT SECTOR, SPACE LIMITS

Daniel Gimpelevich daniel at gimpelevich.san-francisco.ca.us
Tue Aug 1 10:19:47 PDT 2017


On Tue, 2017-08-01 at 10:08 -0700, Rick Moen wrote:
> Quoting Alex Kleider (akleider at sonic.net):
> 
> > Yes, the output is very difficult to read and even with the widest
> > window possible on my laptop, all the lines ran over so I came up
> > with the following little script that might be of use to others.
> 
> That's a nice little Python script.  But, are you sure you need it?, 
> On every apt/dpkg-based system I've used, it's sufficient to just make
> sure your terminal is at least 80 columns wide, and then 'dkpg -l |
> less' displays quite legibly.
> 
> If you want to force 'dpkg -l' to take terminal width into account, use
> local shell variable COLUMNS.  Otherwise, 'dpkg -l' will use column
> sizes based on the longest fields; thus the output may be wider than the
> terminal.
> 
> COLUMNS=$COLUMNS dpkg -l | less

In the steps I gave, I piped dpkg -l through cat because it apparently
detects the number of columns from the tty that is stdout, and not from
a pipe, e.g. to less or cat.




More information about the sf-lug mailing list