Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i'm trying to use "ls -w" so that more of the width of my screen gets used and i don't have to scroll up so much. my problem is that i can't seem to understand what the columns are. is each column a character width, pixel width, or something else? i've tried looking around with google and even experimenting on my own with different widths, but it's just not clear to me.
also, what does the -T option do? i thought it would increase the spaces between filenames by one column(whatever a column is), but it doesn't seem to behave that way.
Last edited by twelvenine; 12-21-2008 at 01:06 AM.
As I understand the T option, all it's doing is specifying the spacing of the tab stops in the terminal output. For us old folks, this is perfectly reasonable, since a typewriter platen moved to the next tab stop every time the tab key was pressed. The "stops" were pieces of metal (little tabs) that you could slide onto a bar behind the platen that "stopped" the motion when the single-space gear was released.
Since the "terminal" window is emulating a typewriter, you should be able to specify the position of the "tab" stops, although most settings assume that the "stops" are equally spaced, so, for example, -T8 places the "stop" after every eighth character.
Since the "terminal" window is emulating a typewriter, you should be able to specify the position of the "tab" stops, although most settings assume that the "stops" are equally spaced, so, for example, -T8 places the "stop" after every eighth character.
I think that's the correct explanation.
What is not immediately obvious is why the default (8) gives neat columns, and other settings do not. I suspect it has to do with the actual "tab" characters that are inserted in the text stream.
I just opened a terminal and it defaulted to 80 characters wide (not pixels).
If I do "ls -w 100", the output runs off the side of the window. Thus, I assume that---with the flag---ls thinks I have a terminal that is 100 characters wide.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.