Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site mplvax.ARPA Path: utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!sdcc6!mplvax!cdl From: cdl@mplvax.ARPA (Carl Lowenstein) Newsgroups: net.unix Subject: Re: /bin/ls -C Question Message-ID: <261@mplvax.ARPA> Date: Thu, 20-Feb-86 10:19:27 EST Article-I.D.: mplvax.261 Posted: Thu Feb 20 10:19:27 1986 Date-Received: Mon, 24-Feb-86 07:36:15 EST References: <337@chinet.UUCP> Reply-To: cdl@mplvax.UUCP (Carl Lowenstein) Organization: Marine Physical Laboratory, UCSD Lines: 16 Keywords: ls In article <337@chinet.UUCP> megabyte@chinet.UUCP (Mark E. Sunderlin) writes: >Ok, here is my question to the net. Why does ls -C Sometimes >NOT print across the screen? >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) This seems to be the now-famous SysV 14-character filename bug. Directories have exactly 14 bytes allocated for the file name, so a full-length name can't have a null terminator. When ls(1) tries to compute the number of columns to use for the -C option it gets some ridiculously long length for one of the file names, and gives up and uses a single column. -- carl lowenstein marine physical lab u.c. san diego {ihnp4|decvax|akgua|dcdwest|ucbvax} !sdcsvax!mplvax!cdl