Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
columns in ls
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
NuclearFusi0n
Apprentice
Apprentice


Joined: 20 Jun 2003
Posts: 297

PostPosted: Wed Jan 21, 2004 9:10 am    Post subject: columns in ls Reply with quote

How can I make ls know how many columns are in my console automatically?

man ls:
Code:
       -w, --width cols
              Assume  the  screen  is cols columns wide.  The default is taken
              from the terminal driver if possible; otherwise the  environment
              variable  COLUMNS is used if it is set; otherwise the default is
              80.


What's the "terminal driver"? How can I make ls automatically take advantage of all the size available to it when running it in something like aterm?
_________________
I will keel yoo grub
Back to top
View user's profile Send private message
jmz2
Guru
Guru


Joined: 13 Jan 2004
Posts: 421
Location: Finland

PostPosted: Wed Jan 21, 2004 10:37 am    Post subject: Reply with quote

Terminal driver here is most likely a pseudo terminal, provided by the kernel. You are working with a pseudo terminal whenever you've a terminal window open in X. X and your shell should work together to set terminal properties in case you change the window size.

If your terminal area won't get resized with the window, you propably have the wrong value in your TERM environment value. Try
Code:
export TERM=xterm
Or then your TERMCAP is not set up properly. Have you tweaked terminal settings?

The -w parameter to ls will propably screw the output if your terminal is not correctly sized.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum