I am having an odd problem. May be something I knew and forgot. I have a need to veiw my bin commands. Simple. Except that when I use the normal "ls /usr/bin" I get a listing in single file, making the first half of the list hidden. I have found no other directory that does this. Don't currently have a printer, so that is not an option. Any ideas to getting it to use whole terminal instead of single-filing? Am using MDK10. TIA chuck
"when I use the normal "ls /usr/bin" I get a listing in single file, making the first half of the list hidden."
I found that ls can do this if some-really-long-name-file is in that directory. It won't do columns and you get the effect you wrote about. In the meantime try...
ls | more
Bob
As has been said it usually happens because there is a long file name or dir name in /usr/bin so that the default multi-column view is forced to single column.
/usr/bin also tends to have a huge number of files in it. On my system (FC2) I currently have 2710 files in /usr/bin. With a simple 'ls' on that folder it will still produce 10+ screens of listing even with the terminal window maximized so that I get 4 columns.
There are several ways around this:
'ls /usr/bin/ | less'
you will get a single column listing that is searchable and pageable. Type '/string' to search forward for 'string', type '/' to repeat last forward search, type 'q' to quit. You can also add the '-x' option if you want to get more than one column when the output is piped through 'less'.
Another option is to simply use automatic filename completion. This is a standard feature in the bash shell and is configured correctly on most versions of Linux I have ever used. Simply type:
'/usr/bin/'
Then press the [Tab] key a couple of times. You should see something like this:
[utidjian@cobalt utidjian]$ /usr/bin/
Display all 2710 possibilities? (y or n)
Then press 'Y' to get a multicolumn (depending on terminal and filename size) view of the contents of /usr/bin that is automagically piped through 'more'. Press the spacebar to page, 'q' to quit. Another nice feature of Tab completion is, say, you wanted to list all the commands that begin with 'k' (or whatever). Just type '/usr/bin/k' and press the [Tab] key twice. On my system I get:
[utidjian@cobalt utidjian]$ /usr/bin/k
Display all 217 possibilities? (y or n)
Press 'y' and you will get all possible completions that begin with 'k'.
Note: This feature of Tab completion works this way because the all files in /usr/bin/ are executable (or should be). Compare to the commands:
/etc/[Tab][Tab]
and
ls /etc/
For more Tab completion silliness try just pressing [Tab][Tab] at a blank prompt. You will get all possible completions... which is all possible commands in your path.
-DU-...etc...
Thanks, everyone. Will try suggestions(although I have no doubt all will do what I need). I do remember Bob's solution(now) from the Red Hat 9 Bible I no longer have. In Windows now, but "manana". chuck
Played with different ones. Got what I needed and David's info for future reference. Thats why I have change to a new downloads and info CD. Save good old ones to HDD and reburn. Incidently, I had 2056 in Mandrake 10. Thanks,
again. chuck
| Forum legend: | |
| Locked thread | |
| Moderator | |
![]() |
CNET staff |
![]() |
Samsung staff |
| Norton Authorized Support team | |
| AVG staff | |
| Windows Outreach team | |
![]() |
Dell staff |
| Intel staff | |