/bin/ls -C Question

Kim Chr. Madsen kimcm at olamb.UUCP
Sat Feb 22 00:04:40 AEST 1986


[come on ye little faithfull friends -- and eat me !]

> Ok, here is my question to the net.  Why does ls -C Sometimes
> NOT print across the screen?  Most of the time when I enter
> a ls -C I get a nice diretory like:
> News    fvps.c  h19     mbox    vps.c
> But some times a directory will list one per line on me.  What does
> ls make this decision on?  I have seen this behavior on both at&t 3b2
> machines and on Tandy 6000 machines. (sys V on one Xenix 3 on the latter)
> Any thoughts???

Well on the 3b2 the answer is: If a filename in the directory is exactly 16 
characters long the colomnized version of ls will fail. A kludge to handle this
is to pipe `ls' though `pr -4' to get a four colomn output...

					Kim Chr. Madsen
					AmbraSoft A/S
					kimcm at olamb.uucp



More information about the Comp.unix mailing list