home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
2
/
2694
/
README
< prev
Wrap
Text File
|
1991-02-07
|
3KB
|
91 lines
This is a quick and dirty rehack of my list(C) shellscript I posted before.
The source code is not elegant at all, but the program is very _fast_!
The bigger the directory, the faster it is in relation to "ls". Yes, it is
even faster!
Also, this version is more verbose than the old shell script. You can
print the owner, group and last modification date of the file now. You
can even use one description list for several directories...
I've added a little shell script for easy copying and description
generation, named cpl(C).
@(#) README 1.2 91/02/07
Author: Christian Schlichtherle, 1991
(chris@attron.ruhr.sub.org)
README - Documentation file for list(C).
NAME
list - Prints documented listings.
SYNTAX
list [-s] [-a|-A] [-ugd] [-l <listpath>] [<pathname>] ...
list -U [-k] [-l <listpath>] [<directory>] ...
cpl <file> <file>
cpl <file> ... <dir>
DESCRIPTION
list(C) prints a documented listing on standard output. The
output is formatted. The first field contains the size of the
file in bytes and the second field the filename. The rest of
the line contains the description for the file. The lines
are sorted in increasing ASCII collating sequence (like
ls(C)).
The description for the files is held in the file ".list"
in the directory where the files reside. This file is
formatted as follows: The first field contains the filename
and the rest of the line contains the description for the
file. The lines are sorted in increasing ASCII collating
sequence.
Options:
-s Sorts the description lines found in ".list" before
listing the files. This is useful if your ".list"
file isn't sorted already.
-A Lists filenames beginning with a period for non
superusers, too.
-a Lists all valid entries found in the directory.
-u Prints the owner (user) of the file, too.
-g Prints the group of the file, too.
-d Prints the date of last modification to the file,
too.
-l name Overrides the default filename of the description
list ".list". You can use any valid pathname.
The second form of the command 'list -U [<directory> ...]'
updates the ".list" file. The lines are sorted, descriptions
for nonexistent files are thrown away and the output is
formatted.
Options:
-k Keeps the description file if it is empty after
updating. Normally the file is removed if it is
empty after updating.
-l name Overrides the default filename of the description
list ".list". You can use any valid pathname.
The update is made to this file instead of the
default ".list".
You can use cpl(C) for easy copying and description
generation now. The syntax and semantic is the same as cp(C)
(in fact, it uses cp(C)) except that it prompts you for
description lines for the files copied. The syntax of a
description line is the same as the syntax of a line in the
".list" file except that the lines need not be sorted
(list(C) will do this for you).
FILES
.list Description file for listing