Home‎ > ‎

tput - How Big is it?

posted 9 Mar 2012, 08:09 by Phil Burchill

It's not every day you learn a new Unix command especially and old command that is useful in today's wobbly window world.

tput queries the terminal database to find out how big your terminal is.  But this depends on your window these days.  Gone are the days of an 80x24 terminal.  Sometimes though you need to know, "How big is it?"

To find out how many columns you have:
tput cols

To find out how many rows/lines you have:
tput lines

That's it!

Here I was changing the terminal size and it dynamically updates:

ą
tput.jpg
(17k)
Phil Burchill,
9 Mar 2012, 08:09
Comments