[comp.sys.atari.st] lc

ljdickey@water.waterloo.edu (Lee Dickey) (02/19/89)

I am writing to ask if anyone has done a command for "lc".

For those not "in the know" about "lc", this little command
list all directories and then all files at a the given node 
of your file system.

For instance on my system at the office, I can do

 	% lc 
 	Directories:
 	alpha          beta           comments       gamma

 	Files:
 	EXAMPLE0.ARC   EXAMPLE2.ARC   autoboot.arc   gu_start       gulam.g
 	gulamfix.arc   ljd_bugs.arc

and for many purposes it is more convenient than the nearest "ls"
equivalent:

 	% ls -F
 	EXAMPLE0.ARC	autoboot.arc	gamma/		gulamfix.arc
 	EXAMPLE2.ARC	beta/		gu_start	ljd_bugs.arc
 	alpha/		comments/	gulam.g



-- 
    L. J. Dickey, Faculty of Mathematics, University of Waterloo.
	ljdickey@water.UWaterloo.ca	ljdickey@water.BITNET
	ljdickey@water.UUCP		..!uunet!watmath!water!ljdickey
	ljdickey@water.waterloo.edu	

ralph@laas.laas.fr (Ralph P. Sobek) (02/25/89)

In article <2107@water.waterloo.edu>, ljdickey@water.waterloo.edu (Lee Dickey) writes:
> For those not "in the know" about "lc", this little command
> list all directories and then all files at a the given node 
> of your file system.

It seems that your `lc' is non-standard with respect to System V;
that's where it came from.  On my Unix(tm) Box I have the alias:

	alias lf 'lc -F'

which produces your `ls -F'.  Ls -F tells you what's executable or
not, usually :-].  Under gulam I use a similar alias.

Have fun,

-- 
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.laas.fr			   Addresses are ordered by importance.
ralph@laas.uucp, or ...!uunet!mcvax!laas!ralph		If all else fails, try:
SOBEK@FRMOP11.BITNET				      sobek@eclair.Berkeley.EDU

egisin@mks.UUCP (Eric Gisin) (02/26/89)

In article <300@laas.laas.fr>, ralph@laas.laas.fr (Ralph P. Sobek) writes:
> It seems that your `lc' is non-standard with respect to System V;
> that's where it came from.  On my Unix(tm) Box I have the alias:
> 
> 	alias lf 'lc -F'
> 
> which produces your `ls -F'.  Ls -F tells you what's executable or
> not, usually :-].  Under gulam I use a similar alias.

The One True "lc" predates V7; it was invented at
the University of Waterloo under V6 (maybe earlier).
The 4BSD version has been posted to comp.sources.unix.

On Xenix, lc is a link to ls, and is effectively an alias for "ls -C".
This is probably a Xenixism, based on a Berkeleyism.
Why would anyone want their files sorted down instead of across?

leo@philmds.UUCP (Leo de Wit) (02/28/89)

In article <679@mks.UUCP> egisin@mks.UUCP (Eric Gisin) writes:
    []
|The One True "lc" predates V7; it was invented at
|the University of Waterloo under V6 (maybe earlier).
|The 4BSD version has been posted to comp.sources.unix.
|
|On Xenix, lc is a link to ls, and is effectively an alias for "ls -C".
|This is probably a Xenixism, based on a Berkeleyism.

As far as I know, -C is not to discern between sorted down or sorted
across, but to force multiple column output. 'ls' and 'ls -C' give
exactly the same result (when connected to a terminal) on my system
(Ultrix 2.0, which is a Berkeleyism 8-). Remember that 'ls' is a very
old Unix program; it tries to be smart: when standard output is a
terminal you get automagically multiple columns (and sorted down), when
not the filenames each appear on one line; try f.i. 'ls|more'. Nowadays
that would be considered a kludge, but since 'ls' is that old, changing
it could perhaps break other programs (notably shell scripts).
So if you want multiple columns through the pipe, do it ala 'ls -C|more'.
If your experience with -C is different, your system is certainly
different from BSD.

|Why would anyone want their files sorted down instead of across?

That's not so unreasonable; telephone books are also organized that way.
In fact it is much easier scanning a vertical list than a horizontal one
(of course your opinion may differ ...). The only time I don't like this
is when a column is longer than the screen (but why shouldn't scrolling be
sidewards instead of downwards ...).

	 Leo.

ljdickey@watmum.waterloo.edu (Lee Dickey) (03/01/89)

In article <300@laas.laas.fr> someone who shall remain nameless

>It seems that your `lc' is non-standard with respect to System V;
>that's where it came from.

Perhaps someone who knows more about this will comment.

I have used "lc" since the early 70's,
When was System V introduced?

ljdickey@watmum.waterloo.edu (Lee Dickey) (03/01/89)

In article <679@mks.UUCP> egisin@mks.UUCP (Eric Gisin) writes:
>In article <300@laas.laas.fr>, someone writes
>> It seems that your `lc' is non-standard with respect to System V;
>> that's where it came from.
>>  ...
>The One True "lc" predates V7; it was invented at
>the University of Waterloo under V6 (maybe earlier).
>The 4BSD version has been posted to comp.sources.unix.

I think that "lc" pre-dates V6, even.  I believe it was written
in the early 70s, shortly after the Math Faculty acquired a machine
with a GCOS operation system.  It was out the the frustration of having
to deal with a couple of miserable "cata" and "catl" commands that
"lc" was born, and was one of the first of a new breed of system
commands installed on that system.  The command was written in "B",
(a pre-cursor to "C").  When the Math Faculty acquired a UNIX system,
the "B" code was quickly translated to "C".

Today, many users on Honeywell and Honeywell-Bull machines running GCOS
operating system use the "lc" command, along with other software developed
and written at Waterloo.  Those who must use that hardware, but who do
not have the benefit of this software, suffer under undue hardship. 

fyl@ssc.UUCP (Phil Hughes) (03/02/89)

In article <8344@watcgl.waterloo.edu>, ljdickey@watmum.waterloo.edu (Lee Dickey) writes:
> In article <300@laas.laas.fr> someone who shall remain nameless

> >It seems that your `lc' is non-standard with respect to System V;
> >that's where it came from.

> Perhaps someone who knows more about this will comment.

> I have used "lc" since the early 70's,
> When was System V introduced?

lc is a XENIX-ism.  It is, in system 5 jargon, equivalent to ls -C.
It forces ls to produce multi-column output with the entries sorted
down the column (as opposed to ls -x which sorts across).

Some system 5s come with lc just to humor the XENIX users - ENIX
is an example.  I don't have my 386 5.3.2 manual here but it may
have been added by ATT in that release just to humor people but
I can promise you it isn't standard in release 5.3.0 from ATT.

The solution of course is to get a complete set of our pocket references
on all flavors of UNIX so you can play mix and match games :-).

-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
    uw-beaver!tikal!ssc!fyl or uunet!pilchuck!ssc!fyl or attmail!ssc!fyl

juancho@dgp.toronto.edu (John Buchanan) (03/02/89)

>lc is a XENIX-ism.  It is, in system 5 jargon, equivalent to ls -C.
>It forces ls to produce multi-column output with the entries sorted
>down the column (as opposed to ls -x which sorts across).


Maybe I am all screwed up but there are two things that I do not understand.
First, why are we talking about this here on the TOSed os newsgroup?  Second,
On the unix box that I use (sun running BSD 4.3 v 3.5) ls -C and lc look like
>ls -C
318		dvi		misc		thesis		xmodem.log
News		fiat		papers		user.ps
bin		lib		src		waterloo.mail
calendar	mbox		temp		waterloo.map
>lc
Directories:
.private       318            News           bin            dvi
fiat           lib            misc           papers         src
temp           thesis

Files:
.startup       .suntools      .twmrc         .uwmrc         .wprompt
.x11startup.cg4               .xstartup      calendar       mbox
user.ps        waterloo.mail  waterloo.map   xmodem.log


What gives?


=====================================================================
| Typical conversation on comp.[atari|amiga|mac].*		    |
=====================================================================
My watch is better than yours.  It has multitasking, windows and
plays Old macdonald has a farm.  I will not listen to reason, of
course your watch is not as good as mine, in fact you are
silly for having bought it.  Sell it and buy my kind.
   o /
====X================================================================
   o \
John W. Buchanan                  Dynamic Graphics Project
               			  Computer Systems Research Institute
(416) 978-6619			  University of Toronto
juancho@dgp.toronto.edu
juancho@toronto.CSNET
{allegra,cornell,decvax,ihnp4,linus,utzoo}!utdgp!juancho

ljdickey@water.waterloo.edu (Lee Dickey) (03/04/89)

In article <8903021331.AA16536@cartier.dgp.toronto.edu> juancho@dgp.toronto.edu (John Buchanan) writes:

>Maybe I am all screwed up but there are two things that I do not understand.
>First, why are we talking about this here on the TOSed os newsgroup? 
Because "lc" is a nice command to have on a command line interpreter.
In my first posting, I gave an example that showed what was wanted.
Your example (not repeated here) shows the right stuff.  "lc" is not
specific to unix, as I stated in an earlier posting, but for some
folks, it has been ported there.  Those who have "lc" aliased to "ls
-C" are missing something, if they do not know about the good stuff are
culturally deprived.  Too bad.

I think we may have the right thing before long, to run on the Atari ST,
under TOS.  OK?

-- 
    L. J. Dickey, Faculty of Mathematics, University of Waterloo.
	ljdickey@water.UWaterloo.ca	ljdickey@water.BITNET
	ljdickey@water.UUCP		..!uunet!watmath!water!ljdickey
	ljdickey@water.waterloo.edu	

greg@sce.carleton.ca (Greg Franks) (03/05/89)

In article <1729@ssc.UUCP> fyl@ssc.UUCP (Phil Hughes) writes:
>In article <8344@watcgl.waterloo.edu>, ljdickey@watmum.waterloo.edu (Lee Dickey) writes:
>> In article <300@laas.laas.fr> someone who shall remain nameless
>
>> >It seems that your `lc' is non-standard with respect to System V;
>> >that's where it came from.
>
>> Perhaps someone who knows more about this will comment.
>
>> I have used "lc" since the early 70's,
>> When was System V introduced?
>
>lc is a XENIX-ism.  It is, in system 5 jargon, equivalent to ls -C.
>It forces ls to produce multi-column output with the entries sorted
>down the column (as opposed to ls -x which sorts across).
>

lc stands for 'list catalogue' and existed back in the good old V6
UNIX days, which predates XENIX and Microsoft.  Lc was originally
written in 'B' and ran on a honeywell at Waterloo because the
catalogue listing commands, like most of the software that honeywell
produced, was rather 'quaint'.  (how about 'ACCESS MF foobar' to
change the file attributes... blech)

Needless to say, its been ported quite a bit.

Lc (the one from the net) tends to follow me around where ever I go,
though I never even thought of porting it to my Atari :-).


-- 
Greg Franks                  Systems and Computer Engineering, 
utzoo!dciem!nrcaer!sce!greg  Carleton University, Ottawa, Ontario, Canada.
       uunet!mitel!sce!greg          greg@sce.carleton.ca
from Ottawa Ont, where life in the fast lane is skating two inners!

jangr@microsoft.UUCP (Jan Gray) (03/06/89)

The One True lc (that is, Waterloo lc) has the advantages of separating files
by type and printing dotfiles:
	% lc /
	Directories:
	bin            dev            etc            lib            lost+found
	mnt            once           operator       tmp            u
	usr

	Files:
	.profile       boot           boot-          dos            xenix
	xenix-         xenix.880922

For exploring the file system, lc is superior to ls.  For shell scripts,
lc is all but useless.  Thus lc is the antithesis of proper UNIX tools.
Even so, it is a good bet that a clone of lc can be found on any machine
that a Waterloo-raised UNIX zealot uses.  Accept no substitutes.

Jan Gray  uunet!microsoft!jangr  Microsoft Corp., Redmond Wash.  206-882-8080

john@stag.UUCP (John Stanley) (03/08/89)

[jangr@microsoft.UUCP (Jan Gray) writes...]

> For exploring the file system, lc is superior to ls.  For shell scripts,
> lc is all but useless.  Thus lc is the antithesis of proper UNIX tools.
> Even so, it is a good bet that a clone of lc can be found on any machine
> that a Waterloo-raised UNIX zealot uses.  Accept no substitutes.

  Alright already.  Enough...  If someone (anyone) will send me full
information on the options and what the different formats look like
I'll take a shot at writing it for the ST...

---
John Stanley <dynasoft!john@stag.UUCP>
Software Consultant / Dynasoft Systems

silvert@cs.dal.ca (Bill Silvert) (03/10/89)

In article <0208890304040567@dynasoft.UUCP> dynasoft!john@stag.UUCP (John Stanley) writes:
>  Alright already.  Enough...  If someone (anyone) will send me full
>information on the options and what the different formats look like
>I'll take a shot at writing it for the ST...

I've already sent off the source code for Unix to LJDickey, and I think
that he is working on a port.  Shouldn't be a problem unless it uses
very unusual Unix libraries, but since I ported it from BSD to V several
years ago that is unlikely.  I forget what the code looks like, but I
can make it available.  Address requests to ...!dalcs!biomel!bill, not
to this address.  But be a bit patient, OK?

-- 
Bill Silvert, Habitat Ecology Division.
Bedford Institute of Oceanography, Dartmouth, NS, Canada B2Y 4A2
	UUCP: ...!{uunet,utai,watmath}!dalcs!biomel!bill
	CDN: biomel@cs.dal.CDN	BITNET: bs%dalcs@dalac.BITNET