home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Micro R&D 1
/
MicroRD-CD-ROM-Vol1-1994.iso
/
os20
/
cli
/
newlist82.lha
/
Docs
/
Newlist.doc
< prev
next >
Wrap
Text File
|
1993-10-02
|
60KB
|
1,564 lines
$VER: Newlist8.2 (27-Sep-93) Main doc
NewList 8.2
(too good to be GNUlist!)
by
Phil Dietz
PO Box 306
Yutan, Nebraska
68073
27-Sep-93
===========
Disclaimer:
===========
Newlist is now exclusively shareware! Old versions were "send if
you like"...but I haven't been geeting diddly squat the last 3 versions.
Jeesh if Ray Stevens can sell 1.7 Million videos...I think I should be
able to get a few more patrons to register :-)
What are you guys going to make me do...dress up goofy and sing
about fat women, aliens, and strippers??? :-)
ps. All docs stay in the archive and PD companies must mail me a letter
before *selling* newlist.
==============
Register info:
==============
Registration is now MANDITORY! If you use newist for more than 30
days, then you must send in a donation.
Registration fee: FLEXIBLE.
The registration fee is whatever you want! If you can't convert to
dollars, then just send foreign currency. If you can't send 20 bucks
then send 1 buck. If you can't send money, send a gift for my new
apartment (a lamp, a book, an a4000 etc.:-)
When you register you will get:
- Disk released updates for free.
- a neat and official 'I support shareware' certificate
to show off to your friends saying you care for Amiga Shareware
- discounts on any commercial ventures I may take (soon!)
If you use Newlist then support Newlist.
^^^ ^^^^^^^
================
What is Newlist?
================
Newlist is not only a super fast, super powerful, and super
configurable 'ls', but it has innovative features that make it
the one true 'ls' for the Amiga. Features such as networking, datatypes,
mufs, styles, and internal string editing just aren't found in every
program. Newlist has power features, power customization, power speed,
and power flexibility.
The best of ls, the best of ddir, the best of list, and bunches
of my own special features were all put into one small and efficient
package. With NewList, the user is given processing power.
You can sort a directory the way YOU want it.
=======================
Is it too much for you?
=======================
Newlist may seem like too much for those who use the shell only when
they have too (cli-O-phobes)....but trust me, I wouldn't of made newlist
if I didn't see a need for it. Just take it nice and slow. I guarantee
after a day or 2 of using newlist and it's flags, you will start to
realize what you can do with newlist, and you will appreciate all of the
features I have put in.
====================
Features of NewList:
====================
o WB3.0 features including networking, numeric localization,
and datatypes.
o WB2.0 features including assign adds and links.
o Lsjr emulation for those die hard users.
o Envoy and MultiUserFileSystem (muFS) support.
o User definable styles for both filenames and datatypes similar
to color-ls.
o 3 slick multi-columnar quick options to utilize screen space.
o 3 different type of recursion including a hunt mode like whereis.
o localization for foreign users (doesnt require WB2.1+!)
(10 languages are included in the newlist package.)
o internal string editing for the picky.
o a built in StarBurst utility for * wildcards.
o very fast algorithms and 'tight' code.
o full UNIX and AmigaDOS wildcards (n*l*s#? = newlist)
o User definable permanent and conditional variables.
o header, date, multi-column, and print formatting, so you can have
newlist run like lsjr, dr, or your OWN way!
o flexible argument passing with multiple path support.
o fetches console window bounds and adjusts accordingly.
o a pager.
o ANSI color
o tons of sorts and filters (name, date, size, as-read, even comments!)
o tons and tons and tons of flags and switches!
o it's pure and residentiable!
o SAS6.3 compiled!
Usage:
Short help: Newlist ? or Newlist -?
NewList 8.2 WB2.0+ only BY Phil Dietz *SHAREWARE*
NewList [FLAGS ie. -rqt -p] <paths and wildcards>
l Use long output a Show all files
q qs qt Quick short directories Z No ANSI
s ss Sort by name or filesize r Reverse the sort
sc sr Sort by comment or as-read R Enter subs w/wild one level
sd sn Sort by date or no sort H Hunt for files on disk
gd gf gl Show ONLY dirs, files, or links p Use pager
K Kill language buffer z C= list style directories
F Custom print format "%@pUdbksvcCNnPogDBTGIeEfFhH \Cnte' \f#b#s#o"
nl -?? for complete usage.
Complete help: Newlist ?? or Newlist -??
NewList 8.2 WB2.0+ only BY Phil Dietz SHAREWARE
NewList [FLAGS ie. -rqt -p] <paths and wildcards>
o Overlook _FLAGS* variables e Append _FLAGSCOND: to flags
p Use Pager @ No 'Today' substitution
b k Show blocks or disk keys h No header
u Show DEVICE: usage info t No totals
n Show comments Z No ANSI
gd gf gl Show ONLY dirs, files, or links ! Force ANSI on
gm Mixed output dirs & files G Force Grand totals
s ss Sort by name or filesize d0..8 Eight date/time formats
sc sr Sort by comment or as-read f0..9 Ten formats
sd sn Sort by date or no sort z C= list style directories
r Reverse the sort S Stat totals only
R Enter subs w/wild one level A Use Assign Adds
W Enter subs w/wild ALL levels / Add / to dirs and > to links
H Hunt for files on disk q qs qt Quick short directories
J Do not enter links v Horizontal sort quick style
x# Max # dir-levels to enter y# Quick option uses # columns
c pat Comment wildcard = Separator line
P Use FULL path for names K Kill language buffer
] [ Show/hide 'a' bit B Relative path names
T# Turbo screen output 0..N X pat Exclude pattern
I Toggle Expert mode U Use Styles for filenames
Y pat Datatype wildcard V Use Styles for datatypes
w# j# Set width and height in chars L# Q# Show files < or > # in bytes
l Use long output a Show all files
N O dd-mmm-yy or # Files made after/before date or # days ago
C Custom header format " %@Rs and all date formats "
D Custom date format " %@ABCmdyvMDYhHNSItT \Cnte' \f#b#s#o"
E M F Custom print format "%@pUdbksvcCNnPogDFhH \Cnte' \f#b#s#o"
===============
FLAGS IN DEPTH:
===============
Note: All these flags are compatible with Newlist8 WB3.0 version.
Usage on WB2.0 and WB2.1 will be missing some features.
========================
Miscellaneous Commands
========================
[-?] Short usage help designed for novices and amateurs :-)
[-??] Complete usage help.
[-o] When you want to OVERLOOK the default flag settings in the
NEWLIST.config file. Sections _FLAGS_COND: _FLAGS_LONG: and
_FLAGS_QUICK: will be ignored.
[-e] Appends the conditional flag string _FLAGS_COND: from
S:NEWLIST.config to your current flags. Normally when you give
a flag, your _FLAGS_COND: is skipped. Giving [-e] will tell it
not to skip your default flag settings.
nl -p skips _FLAGS_COND:
nl -pe uses _FLAGS_COND:
[-p] Turns on pagination. When each screen fills, a prompt
will be be put up so you can read all the files before they fly
by! The prompt contains the current grand totals as well as
some neat inverse video effects. You can page the help screen
as well (ie nl -p -?).
[Space] - next full page
[Return] - next line
[n] - non-stop (turns off paging)
[Esc] or [q] - quit newlist
If you re-direct the output of newlist, paging will be turned off.
[-@] Forgets about the TODAY, YESTERDAY, bologna.
[-b] [-k] Instead of the default display of filesize, newlist will
instead display BLOCKS or DISKKEYS respectively.
[-u] Shows bytes FREE and bytes USED on disk. Now you can get
all your needed info with one command instead of a "dir
list info" combo. Note: due to RAM:'s variable size,
the bytes free will be zero. Also note: sometimes the
size is off....I don't know why, but be aware.
[-n] Do you hate seeing those huge FILENOTES destroying your
directory list? This flag will toggle if you want to see them.
If not present, a simple "Comment" or "c" will be shown to tell
you "hey mister, you can read me if you wanna."
[-h] Turns off the header.....ohhhhh.....big deal!
If you are auto-executing [-E] a format, [-h] will turn off
the verbose output.
[-t] Don't show totals.
[-Z] Forces ANSI sequences off. Piping data in shells is different
than redirecting so nl can't tell when to turn off ANSI
automatically. Thus you must give [-Z] whenever you pipe.
(Or use handy alias 'piper')
[-!] Forces ANSI on even when doing redirection to printers, etc.
[-/] Append a slash '/' to directories and a '>' to links.
Output is similar to NeXT Unix, A/UX, and dr.
The link sign '>' will only be printed in [-q] mode.
Oh yeah, I think ls's '@' is an ugly motha so I switched to the '>'
[-=] Prints a separator line between the dirs and the files.
[-S] Stats only option. Only prints totals for each directory.
All newlist filters (*.c -O1 etc.) will still affect the results.
[-d0...8] Eight different pre-made date formats.
-d0 - Expert mode date format
-d1 - Locale.library format
-d2 - YY.MM.DD HH:MM:SS
-d3 - MM/DD/YY HH:MM:SS
-d4 - YY.MM.DD
-d5 - MM/DD/YY
-d6 - Day Mon YY
-d7 - Day Mon [YYY or HH:MM]
-d8 - Date Stamp Values
These formats can be changed by editing your S:NEWLIST.config file.
[-f0..9] Ten different pre-made print formats.
These formats can be changed by editing your S:NEWLIST.config file.
[-P] Expands filename to include full path. This allows a no-hassle
way to see full path names without having to create a custom
format with a %P character. [-P] does not expand quick listings.
[-B] Will use relative path name instead of absolute. So you will
see FONTS: instead of dh0:fonts for example. Added because
a BBS owner wanted to hide his absolute path names from his users.
[-K] Frees all memory Newlist8 previously allocated (about 5k).
Newlist will have to re-parse S:NEWLIST.config when run again.
If you make changes to S:NEWLIST.config and you want to see the
results, you have to kill the file in memory first.
Use [-K] when you need the 5k newlist8 reserves or
use [-K] when you want to try or edit a new locale file.
[-I] Toggles Expert mode between novice<->expert. Having Expert mode
will result in a more compact output similar to 'ls.' Headers
are conditional. Grand totals, dev: usage, misc \n's, and
the separator line are off. The output also uses print and
date formats similar to lsjr. You can edit these formats by
editing the S:NEWLIST.config file. [-I] was implemented for those
users who thought the old newlist showed too much and for those
wanting output like 'ls'.
[-G] Forces grand totals on. Some people like to have directory
totals off [-t] but still want to see a grand total output.
[-T #] When printing to shells, this option will speed up output upto
15-40%!! Giving a # will determine how much prescroll takes place.
0 = turbo off
1 = window height scroll (page at time)
2..N = scrolls number of lines at time
Try values 2, 3, or 4 for optimal performance.
[-w #] Let's you manually define the width of the display in characters.
(default 77) For people that use newlist on BBS's etc.
[-h #] Let's you manually define the heigth of the display in characters.
(default 24) For people that use newlist on BBS's etc.
===============================
Groupings, Sorts, and Filters
===============================
Various filters and sorts to suit most everone. Mix and match.
-gd -gf Groups the display so ONLY dirs, ONLY files, or ONLY links are
-gl shown respectively. Similar to 'dir dirs' or 'dir files'
To show only dir links or only file links, use -glgf or -glgd
respectively.
[-gm] Shows BOTH directories and files in mixed order.
[-gb] Separates dirs and files...it's now the default value of newlist,
but this flag is left in for backwards compatibility.
[-s] Sorts files alphabetically.
[-ss] Sorts files by file size (or blocks [-b]).
[-sd] Sorts files by time (date of creation). Very handy!!
[-sc] Sorts files by comments. If you use FileNotes wisely, you can
have your directories be grouped by file type. Simply
add a filenote to each file and give it a type (Picture, GIF,
Utility, NoiseTracker, etc.) Now when you view by [-sc],
the files will be grouped together by type! You can also use
the included alias 'dirtype' which will display the filetype
in a nice position.
[-sr] Sorts files as-read (actually as hashed), but fully buffered.
To sort by diskkey use [-sr -k].
[-sn] No sort. This is the default for Commodore's list.
This method uses the least memory and is the fastest.
This format prints files as-read.
[-r] Displays a list in REVERSE from top to bottom. WHY?
Instead of waiting for the whole list to scroll by to see a
file at the bottom, you can reverse the list and ctrl-c to
stop quick! It's also handy when sorting by date. All of
the newest files will be displayed first.
[-X pat] Exclude a wildcard pattern. This will NOT show files that match
the pattern. ie nl -X *.info will hide all *.info files.
You may chain as many as you like, but each pattern needs a [-X]
flag. ie nl -X *.c -X *.o -X *.lnk
or nl -X *.(c|o|lnk)
[-c pat] Comment wildcard! A very interesting idea from Tim Boland.
He mentioned that he has his comments on his files telling where
he got the file (Fred Fish Disk 597 or A-LINK BBS etc.) With
[-c pat] command, you can say for instance
nl -c "*Fish 597" to get all files on FF 597
nl -c "*Fish 59*" to get all files in FF 590 series
nl -c "[amicus|*Fish]*" to get all Amicus or FF files
[-c pat] can also be used for a SHOW-ONLY commented files group
filter. To show only files with a comment do a nl -c ?#?
or a nl -c ?*
[-Y pat] Datatype wildcard. This pattern will be matched against all the
entries of the datatype (datatype, groupname, basename, typename
and id)
nl -Y picture shows all pictures
nl -Y "8svx" shows all 8svx sounds
nl -Y [pic|8s]* shows all pictures and 8svx sounds
To show a file's datatypes, see -F '%D %B %T %G %I' or use the
handy alias 'dinfo' in the file 'scripts/aliases'.
[-N] dd-MMM-yy or # days
Shows files made in the last # days or files newer than dd-MMM-yy.
Suppose today is Sun 10-Nov-91 and you want to see files made
yesterday. You can enter these:
nl -N 1 nl -N 09-Nov-91 nl -N Saturday nl -N yesterday
Note how you can enter the # of days, the date, the day name
(Friday, Saturday, etc.), or today, yesterday, etc., to represent
the same thing!
Day names like Saturday represent 'last Saturday' not
'this coming Saturday.'
[-O] dd-MMM-yy or # days
Shows files made before # days ago or files older than dd-MMM-yy.
See above [-N] for examples of usage.
-] Show files with the 'a' archived bit set. The following
produces a list of ALL files on dh0: that have been archived.
nl -]aH dh0:
-[ Show files without the 'a' archived bit set. The following
produces a list of ALL files on dh0: that NEED to be archived.
nl -[aH dh0:
Also see script 'BackUp'
[-L #] Show files that have a size less than or equal to the #
in bytes.
[-Q #] Show files that have a size greater than or equal to the #
in bytes.
[-l] Outputs long format instead of short similar to UNIX ls.
[-a] Show all files (like ls). Normally the default filter in
s:NEWLIST.config hides *.info and .* files! [-a] shows them.
=============================
Short Multi-Column Displays
=============================
Short displays. Lots of different variations for the choosing.
A sort will be used (name by default) none is given.
[-q] Gives a QUICK and easy listing of the directory. The entire
screen will be utilized and multi-columns will be created.
The colors of the names and directories can be changed by
editing the _STYLEMISC: class in S:NEWLIST.config.
Because of [-q] simplicity, not all of the flags are usuable.
(like -D etc.) Vertical sort is the default.
[-qs] Quick option WITH file-sizes! A very very handy option very
similar to DIR opt s, but with multi-columns. Note: if you'd
rather see blocks or keys instead, add -b or -k (ie nl -qs -b)
[-qt] Quick Option WITH file-sizes! Similar to ddir output with
filenames followed by their size. Long file names will be
TRUNCATED (up to 13 chars) to fit inside it's column. Column
width is variable depending on filename lengths and widowsize.
Make the window smaller, then the columns become smaller....
if they become to small (too much truncation) it will use
fewer columns. Blocks [-b] and keys [-k] also work.
Links are also expanded (this feature can be
toggled by editing the config file in the _NONFLAGS: section)
[-v] Horizontal sort the [-q -qs -qt] outputs. Without
[-v], vertical sort is default. Issuing [-v] implicitly
means [-q -v].
[-y #] Force # columns for [-q] quick option. Use this option when
re-directing the output to a WIDE printer. ie. to use 9
columns for a printer with 20 pitch type, use nl >prt: -qy9 dh0:
[-M] Custom Multi-Columnar ouput. See Below.
===================
Custom Formatting
===================
Newlist's power comes from it's custom formatting. While other 'ls'
programs have formating, they LOSE THEIR SPEED. Newlist doesn't.
For help creating custom formats, consult
'docs/FormatTutorial.doc' for a tutorial on printf() style args
'scripts/Aliases' for examples
IMPORTANT: to localize a numeric string in a custom format, replace the
'%' symbol with a '@' symbol.
ie nl -F "Name: %n size: %v %s"
becomes nl -F "Name: %n size: @v @s"
Localization of numbers requires WB3.0. In WB2 '@' (ie @v)
is ignored and replaced with '%' (ie %v).
-----
DATE:
-----
[-D] Custom Date Format. Use if your country has different format.
The format is -D "DATE STRING". Here are the flags available:
%A - locale.library foreign date from DateToStr
%B - locale.library foreign time from DateToStr
%C - locale.library foreign day from DateToStr
NOTE1: %A, %B, and %C are quicker than newlist equivalents. If
you do not own WB2.1, then the results will be in English.
NOTE2: %A, %B, %C use locale.library...if it is configured for
a different language (say german) and you are using
a different language file (say finnish), you will get
a mixture. To get all finnish, replace %A, %B, and %C
with other newlist date format equivalents.
%y - year as 2 digits (90)
%Y - year as 4 digits (1991)
%v - year if older than 1 year...or else the time.
^Note: no truncation (.#) allowed for %v..use %5v and not %5.5v
%m - month as 2 digits (07)
%M - month name ("January".."December")
%.3M - abbreviated month ("Jan".."Dec")
%d - day of month (1-31)
%D - day name ("Monday".."Sunday")
%.3D - abbreviated day ("Mon".."Sun")
%h - hour in twenty-four hour notation
%H - hour in twelve hour notation
%I - 12 hour indicator for H notation (AM or PM)
%N - minutes
%S - seconds
%t - prints centered TODAY, YESTERDAY, or Day name if applicable
%T - two must be present. Mark off block which will be
substituted with Today, Yesterday, if applicable.
If not applicable, it will process the inner block.
(ie -D "Date: %T%3M %2d%T" will sometimes print
Date: Today or Date: Mar 16)
\n, \t, \e, \' - Newline, tab, escape key, or quote ". \e can be used
to make neat ANSI sequences. See aliases 'color'.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in NEWLIST.config file
under _NAMECOLOR:
Make a C string like printf().
-D "Date: %-9.9T%02d-%3.3M-%02y%T at %02H:02N:02S"
yields
Date: 09-Nov-91 at 01:03:20
or Date: Today at 01:03:20
It's Easy. It adds spice.
-------
Header:
-------
[-C] Custom header format if you do not like the default.
Here are the meta-characters:
All date meta-characters above for [-D] (ie. %N, %M, etc.)
%s - Displays Path Name
%R - Adds Assign Add path name followed by an arrow....
ie fonts: ->
So normally you would put %R%s so you get results like
fonts: -> dh0:fonts
An ie: nl -C "\n%R%s on %02d-%3.3M-%02y\n"
w/color: nl -C "\n\f3%R%s\o on \f3%02d-%3.3M-%02y\o\n"
See 'aliases' file for neat examples.
-------------
Short Format:
-------------
[-M] Custom Multi-columnar output. Similar to [-q] short format,
but all of the flags in -F and -D can be used!
[-M] will not put a '\n' newline out until either:
1) you have a forced column setting
ie nl -y3 -M "%n" forces 3 columns
2) it will print off the window.
You WILL need to use expanding.truncating to get the output
in nice columns. For example: nl -M "%-20.20n %U "
Vertical and horizontal sort will not work on this data.
------------
Long Format:
------------
[-F] Custom print format. Now you can design the output the
way YOU want the output to be. Here are the flags supported:
%b - Block size
%c - 'c' if filenote available
%C - 'Comment' if filenote available
%d - Date (this date can be constructed with -D!)
%k - Disk key
%n - File name
%.5n - file name truncated to 5 chars
%N - Filenote
%P - File name with complete path
%s - File size
%v - Variable output. Depends if [-b] [-k] or [none] are used.
%p - C= style protection bits
Networking bits are also shown if applicable.
%U - UNIX protection bits. Adds d for dirs and H/S for links
Routine distinguishes directory and file links.
Networking bits are also shown if applicable.
%L - Prints expanded link names in the form
" -> Full-path-of-file". Soft Links that have
their link not mounted will be displayed as
" -> !myfile".
Bad links will be " -> :UNKNOWN FILE:"
Normally you would put %n%L so you get results like
filelink -> dh0:mylink
These flags require ENVOY:
%E - Users UserID
%e - Users Username
%F - Groups GroupID
%f - Groups GroupID name
%H - Users Primary GroupID
%h - Users Primary GroupID name
These flags require muFS:
%e - Users UserID (short name)
%E - Users Username (long name)
These flags require WB3.0 and/or mufs/envoy:
%o - Networking/multi-user ID for Other
%g - Networking/multi-user ID for Group
%D - File datatype for Description
%B - File datatype for Base name
%G - File datatype for Group
%T - File datatype for Type
%I - File datatype for ID
\n, \t, \e, \' - Add newline, tab, escape charater, or quote ". These
sequences may be used to create neat ANSI stuff. Check
out 'color' in the file 'aliases'. \' is very useful
when filenames you are manipulating contain spaces.
It you put \' around the name ( \'%n\' ) most DOS
commands will now recognize the file.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in NEWLIST.config file
under _NAMECOLOR:
Here is a UNIX ls format example
-F " %U %c %4b %7s %d %n" -D "%.3M %2d %02h:%02n"
For a LOT of examples of formats look in 'scripts/Aliases'
So ya still like LS? Take off, ya hoser.
-------------
Auto Scripts:
-------------
[-E] Execute print format immediately. The format takes the form
of [-F] above.
This will prevent unnecessary script files from being generated.
For example:
nl sounds:* -E "sound %P"
will play all sounds in sounds:.
nl -H -N1 -E "copy %P to backupdisk:" dh0:
will copy all files made in the last day on dh0:
to your backupdisk:.
If you want to copy or move files, etc. with spaces in them
("Read Me"), you should pad the filename with quotes so
AmigaDOS will run it properly. (ie nl -E "copy \'%P\'" )
^ ^
Quote Characters
By default, -E prints in verbose mode (prints Executing xxx....)
To turn it off, turn off the header with [-h] flag.
WB2.0 version will allow interactive input and output with
CLI programs so you can "delete %P ASK" or whatever.
==========================
Recursion and Hunt modes
==========================
Recursion is where you enter subdirectories, print info, enter
it's subdirectories etc. It's similar to 'dir opt all'.
Newlist has 3 different types of recursion available. Mostly they
affect how the wildcard will be applied. Here's how they work:
ie nl [-R|-H|-W] dh0:c* will list
with 'nl -R dh0:c*'
candy/snickers (dir)
[loose wild] cars/datsun
cars/cadillac
cars/yugo
(ALL files in dirs ONLY starting with c)
with 'nl -H dh0:c*'
candy/chocolate (dir)
[hunt mode] cars/cadillac
drinks/coffee
lemons/cray-computer
(ONLY files and dirs starting with c in ALL dirs)
with 'nl -W dh0:c*'
[strict wild] candy/chocolate (dir)
cars/cadillac
(ONLY files starting with c in dirs ONLY starting with c)
[-R] uses the wildcard only on the first level. All files
and subdirectories after that will be displayed.
[-W] uses the wildcard on all levels. Only files and directories
matching the wildcard will be shown/entered.
[-H] enters every single directory no matter the wildcard,
and will only print info that matches the wildcard.
[-R] Recursion. This will use wild card ONLY for the first level.
nl -R FF:n* will show complete listings of dirs that
start with n.
FF:nebraska (dir) FF:names (dir) FF:numbers (dir)
Omaha Phil One
Lincoln Justin Two
etc. etc. etc.
[-W] Will exclusively use wildcard to match files and sub-directories
on EVERY level. ONLY files matching wildcard will be shown
and ONLY subdirectories matching wildcard will be entered.
[-W] is the method that ls uses- enter only dirs matching pat
[-H] Hunt files down. Will recursively enter subdirectories, but
will enter all directories regardless of wildcards, etc. Why?
Now let's say you want a list of all 'c' files on your harddisk.
Simply nl -H dh0:*.c
Besides matching wildcards, [-H] will also accept the other
conditional flags (like -i -N etc.)
Now you can view all files made since yesterday....
nl -H -N yesterday dh0:
[-H] enters every directory it finds (up to -x #) levels and
tries to match corresponding files and dirs.
Hunt mode will now match both files and directories. If you
want to see only matching files, use [-gf] with it.
[-J] Jump links. Newlist will not enter or follow links when in
recursion mode. Works in conjunction with -R, -W, or -H.
[-x #] Only enter # subdirectory levels in recursion mode. Otherwise it
will enter every sub-directory it will find.
Use with [-R, -W, -H]. Root level only is [-x 0].
[-A] Use Assign Adds. When this is set it'll traverse assign added
directories. If you want Assign Adds to be default, then
set the variable in _NONFLAGS:.
=================
Important Points:
=================
-------------------------------
Paths- the directories to view:
-------------------------------
+ You can have more than 1 path. Just add it. ie
nl df0: df1: df2:
+ Paths on the command line will be entered from left to right.
+ The Amiga currentdir character "" may not always work.
An alternative is to have a single wild card, *.
nl * rad: will list rad: then the current directory.
-----------------------------------------
Flags- how they work and are interpreted:
-----------------------------------------
+ All of the flags and paths can be used in ANY order.
nl dh0: -s df1: -r
is the same as nl dh0: df1: -s -r
+ Flags may be joined together: nl -rsgmh
separated: nl -r -s -gm -h
or both: nl -rs -gmh
IMPORTANT: watch out for amibiguous flag combinations.
ie. nl -qsd is not the same as nl -q -sd
The -qsd is parsed to be -qs and -d.
+ Flag parsing ignores whitespace. So if you say
nl -F"%n"
or nl -F[TAB][TAB]"%n" etc. they will be the same.
+ Most flags allow toggling back and forth.
nl -a is on
nl -aa is off
nl -aaa is on etc.
+ Precendence of flags goes as follows:
flags from
----------
Most Priority : Command Line
_FLAGS_COND:
Least _FLAGS_QUICK: or _FLAGS_LONG:
+ All of the flags can be used together (-q has exceptions):
You can view a directory of files made in the last 2 weeks,
sorted by date in reverse order, showing block size , with
a custom dateformat string, custom print string, hiding
.info files, paging, using a UNIX wildcard, etc. etc.
-----------------------------
Wildcards- how they are used:
-----------------------------
+ Both Amiga and UNIX wildcards are supported
To use a wildcard simply add it right after the path
(ie dh0:*.c)
+ The wildcard MUST be connected to it's path. If you say
nl dh0:*.c (right)
nl dh0: *.c (wrong)
NewList will think you want a dir of dh0: AND a dir of
files matching *.c in the current directory.
+ Each new path may have a totally different wildcard
nl *.doc ram:*.c df0:*.lzh c:d?r df0:
^ ^ ^
just wildcard both just path
(assume current (assume * as
directory) wildcard)
+ "nl ?" brings up the help message.
To use '?' as a UNIX wildcard add a space ' ' or a flag
or a path before or after the '?'.
"nl ?" or "nl -?" get help
"nl ? " or "nl -s ?"
or "nl dh0:?" use '?' as wildcard
----------------------------
Supported wildcard patterns:
----------------------------
? Matches a single character
# Matches the following expresion 0 or more times
(ab|cd) Matches any one of the items separated by |
~ Negates the expressions
[abc] Character class: matches any of the characters
in the class
[~bc] Character class: matches any of the characters NOT
in the class
a-z Character range ie [a-l] (WB2.0 users need to CAPITALIZE the
letters ie [A-D]
% Matches 0 characers always (useful in "(foo|bar|%)")
* A synonym to #?
(ab*|*xy*|~*.c) A compound wildcard
========================
Support for WB2.0 Links:
========================
NewList has complete support for WB2.0's new link format.
NewList has the BEST link support available. This complete support
includes:
1) Hard links, soft links, and pipes are supported.
2) Links will be shown VIA the UNIX style protection bits.
ie dH----rwed and -H----rwed
^(dir link) ^(file link)
depending if they point to a directory or a file. Hard
and soft links will also be shown by the bits H and S
after the d
ie dH----rwed and -H----rwed
^(dir hard link) ^(file hard link)
dS----rwed and -S----rwed
^(dir soft link) ^(file soft link)
-P----rwed
^pipe
3) Link names can be fully expanded to tell where they point too
(even unmounted soft links!)
link -> dh0:source/newlist
4) Soft links will be distinguished as being dir links or file links.
Thus, softlinks will be transparently identical to hard links.
(softlinks do not tell if they point to a file or a dir. NewList
will find out for itsself.)
5) Intelligent link traversals. Circular directories and back-links
will not confuse newlist (unlike Commodore 'list'!)
A special method is used to prevent nonterminating loops.
A directory will ONLY be shown once. If a link wants to show
it again, it will be ignored.
6) Bad soft links or links that can't be resolved will be
detected and have the value:
link -> :UNKNOWN FILE:
7) [-/] flag will display links with a trailing >.
The color and style of the links depends on the user settings
in _STYLEMISC: class in S:NEWLIST.config.
8) Soft links that are not mounted will have a ! in front of
them. ie. link -> !df1:myfile
9) Recursive modes [-R -W -H] by default will traverse links.
If you wish for them not to be traversed, give [-J] jump option.
10) Better link utilities are given in the /Misc drawer.
A new 'makelink' utility that supports soft link generation
and a 'deletelink' utility to erase them are included. They
include full 'C' source.
==============
WB3.0 Support:
==============
Again newlist sets a precedence for supporting all of Commodore's newest
innovations. This time newlist is one of the few listers that recognize
the new Networking, muFS, Envoy, DataTypes, and Misc. facilities.
----------
Networking
----------
The networking/multi-user support is given by showing the Group and Owner
IDs for a given file as well as their new protection bits....
-Using '%U' protection bits:
dH rwedrwed sparwxd 123 456 07-Feb-93 2 UserNa 366 exec.h
--+---+-----+--- -+- -+-
+---+ | std. | +---+
Other Group OtherID GroupID
-Using '%p' protection bits:
exec.h 366 ---rwedrwedrwed 09-Mar-93 10:52 UserName
------+---+---+
std. | +--+
other group
^
This C= style of bits is given with '%p'
NOTE: The networking ID's and protection bits only show up
when you are doing a networked directory. This prevents unnecessary
data from being printed all the time.
----
muFS
----
Mufs does not require WB3.0. See networking above for info.
Newlist 8 also supports the Shareware filesystem called mufs which allows
for a multi-user filesystem similar to UNIX. When mufs is in use,
newlist8 will be able to show the owner name and id that owns a particular
file. If a user installs Envoy, then muFS will no longer be recognized.
Remeber that in order to use muFS or Envoy, you must set the use Envoy/
muFS bit in the _NONFLAGS: section of S:NEWLIST.config to 'y' for yes.
muFS is able to show the files:
-UserID (short name)
-Username (long name)
-----
Envoy
-----
Envoy does not require WB3.0.
Basically the Envoy support is expansion of Owner and Group IDs...
see muFS and Networking above.
Remeber that in order to use muFS or Envoy, you must set the use Envoy/
muFS bit in the _NONFLAGS: section of S:NEWLIST.config to 'y' for yes.
Envoy support is able to show a files:
-Username
-UserID
-Groupname
-GroupID
-Primary Groupname
-Primary GroupID
---------
DataTypes
---------
This very powerful feature allows file types to be easily recognized.
Adding a new datatype to the system allows for all programs (like newlist)
to recognize it as well...
Normally you would see directories like this:
d----rwxd Oct 07 92 22:42 1 22222 spinach
However how you do not know what 'spinach' is. With newlist8 you can find
out! The directory will show:
d----rwxd Oct 07 92 22:42 1 Picture 22222 spinach
or d----rwxd Oct 07 92 22:42 1 ILBM 22222 spinach
or whichever fields you feel are most appropriate!
Surprisingly WB3.0 datatype recognition is fast as well taking only
a few extra milliseconds per file! However if you feel this
slow-down is too much, you can simply "not use the feature" and
not lose ANY performance from earlier versions. To "not use the feature"
simply remove any datatype flags from your custom formats (%DBTGI).
Datatypes that can be shown:
-Datatype
-Basename
-Type
-Group
-ID
Besides showing the types strings newlist also supports:
-Datatype wildcards [-Y pat]
-Datatype styles and color enhancement [-V]
-------------
Miscellaneous
-------------
Numeric data can be LOCALIZED as long as you own WB3.0.
An example of localized data is 1,234 instead of 1234.
To use this feature you must do some editing of the s:NEWLIST.config
file. Edit the internal strings sections of the config file.
To localize the internal strings of newlist (in S:NEWLIST.config):
Simply replace the string %ld with %lD in the places where you feel
expanded numbers would suit best....like in the dev: size string, etc.
Example:
"Used %4lD bytes - Free %4lD bytes (%ld %% free)\n"
^ ^
was 'd' notice how the %free will not be localized
To localize your custom formats:
Simply replace the percent sign (%) of the meta-character
(ie %b, %s, etc.) with an ampersand sign (@).
Example:
nl -F "Name: %20.20n Size: %7s"
becomes nl -F "Name: %20.20n Size: @7s"
========================================
Default Permanent and Conditional Flags:
========================================
If you wish for certain flags to always be set, you are able to
by editing the S:NEWLIST.config file. Newlist has 3 types of
flag settings. One is conditional and the other 2 are
permanent.
_FLAGS_QUICK: permanent variables
_FLAGS_LONG: permanent variables
_FLAGS_COND: conditional variable
_NONFLAGS: permanent internal variables
----------------
Permanent Flags:
----------------
These will load in all cases except when [-o] is given. These flags
are designed for permanent flags like custom date and print formats,
as well as other permanent type data. Depending on how you execute
newlist, certain variables will be loaded:
_FLAGS_QUICK: will be read only for a quick [-q] format.
_FLAGS_LONG: will be read only for a long format.
-----------
Conditional
-----------
The conditional variable _FLAGS_COND: is used only in certain
circumstances. They are:
1) No flags are given (ie nl df0:)
or 2) The [-e] append flag is given. (ie nl -e)
If any flag is given or if you issue [-o] then _FLAGS_COND: will
be ignored.
One uses the conditional variable _FLAGS_COND: when one wants certain
flags to be used most of the time. This allows you to easily change
from one newlist output to another without many hassles.
For example...lets say your _FLAGS_COND: is a sort by date "-sd"
Giving 'nl -q' will skip _FLAGS_COND: and thus sort by name (default)
----------
_NONFLAGS:
----------
Newlist8.2 has a new class called _NONFLAGS: that allows you to set
some configurations for newlist that don't normally have flags
(like -a, etc.). The bits are:
USAGE: n = No y = Yes
Bit 0123456789a Bit 0 Long mode [-l] default?
||||||||||| Bit 1 Variable Column [-q] calculation?
"yyyyyyynnnn Bit 2 Lsjr dirs-on-the-side for [-q]?
Bit 3 [-qt] Expands links?
Bit 4 Use/check/force Envoy/Mufs?
Bit 5 System Requestors off?
Bit 6 Default to Use Assign Add's?
Bit 7 Help [-?] uses paging?
Bit 8 Merge similar paths?
Bit 9 Recurs. in ass-add uses extnd. headers
Bit a Help -? uses longhelp only
---------------
Flag Precedence
---------------
Most Priority : Command Line
_FLAGS_COND:
Least _FLAGS_QUICK: or _FLAGS_LONG:
-----------------------------------
Things you can do w/ default flags:
-----------------------------------
Examples: Commodore style to be the default put "-z" in
_FLAGS_LONG: in S:NEWLIST.config
for die-> Short output listing as default (like ls)
hard ls set the 1st NONFLAGS field to 'n'
users Special header for small style put
"-C *"\b3Test String\o\n*"" in _FLAGS_QUICK:
=========================
How to set default flags:
=========================
Simply edit the file S:NEWLIST.config in your favorite text
editor! Remeber that when you change the cofig file, you won't
see the changes until you kill the buffer in memory with nl -K
=============
Localization:
=============
Localiztion has been added to Newlist. It does _NOT_ require
WB2.1 or above, only WB2.04. Localization allows users to rewrite the
internal strings of newlist to run in their own native language.
So Newlist can now be German...Dutch...Polish...or whatever.
Ten languages are currently supported (however is Elite considered
a language?? :-)
As a benefit, you can change the ANSI colors and styles so the
output is to YOUR personal liking!
---------
IMPORTANT
---------
Newlist parses the S:NEWLIST.config file *only 1 time*, after that
further calls will use the parsed strings already in memory!! This
drastically increases newlist's performance. If at any time you want
this 5k of memory back or if you want to change the S:NEWLIST.config file,
you can free this memory with the [-K] option.
Whenever you edit S:NEWLIST.config do: nl -K
NOTE: S:NEWLIST.config is not a WB2.1 catalog as WB2.04 users are
people too :-)
==============================================
Language Editing and Internal String Changing:
==============================================
Newlist's greatest feature is that a user can configure newlist
to print the way he wants it too. One can edit the colors, the styles,
the date formats, the print formats, the totals...the whole enchilada.
He can make it run in Booga or he can make it run in duDeZ...just
make it.
When editing the strings you can add all the ansi sequences you want
including the macros that newlist has. The current macros are:
\n, \t, \e, \' - Add newline, tab, escape character, or quote ".
These sequences may be used to create neat ANSI stuff.
\b# - sets background color (0-9)
\f# - sets foreground color (0-9)
\s# - sets style (0-9)
\o - resets ansi for normal output
\C - Adds color string defined in language file under _NAMECOLOR:
This section will describe each language class, it's features, and
what you can do with them.
_NAMECOLOR:
This is the default color that newlist uses all over the place
(like in the Usage, the totals, etc.) This color is also used
whenever you use \C in a format. There are 2 different fields:
Regular ANSI
& Monochrome ANSI
When newlist is run on a monochrome shell (depth==1) it will
define \C to be the monochrome color you give. Newlist's default
monochrome color is "\s1" or a bold style.
_NONFLAGS:
These are variable that don't have a formal flag given to them.
They are:
USAGE: n = No y = Yes
Bit 0123456789a Bit 0 Long mode [-l] default?
||||||||||| Bit 1 Variable Column [-q] calculation?
"yyyyyyynnnn" Bit 2 Lsjr dirs-on-the-side for [-q]?
Bit 3 [-qt] Expands links?
Bit 4 Use/check/force Envoy/Mufs?
Bit 5 System Requestors off?
Bit 6 Use Assign Add's?
Bit 7 Help [-?] uses paging?
Bit 8 Merge similar paths?
Bit 9 Recurs. in ass-add uses extnd. headers
Bit a Help -? uses longhelp only
The system default is "yyyyyyynnnn" if you ever forget.
_FLAGS_LONG:
Flag preferences that used to be ENV: variables.
See the section above that deals with default variables.
_FLAGS_QUICK:
Flag preferences that used to be ENV: variables.
See the section above that deals with default variables.
_FLAGS_COND:
Flag preferences that used to be ENV: variables.
See the section above that deals with default variables.
_DEFAULTS:
The default date and print formats that newlist uses.
The defaults are:
" %U %c %d %4b @7v %n%L %e" # (new) ls [-l] long format
"%-9.9T%3.3M %02d %2y%T %5.5B" # (new) ls [-l] date format
"%U %c %4b @7s %d %n%L %e" # (new) expert [-I] format
"%.3M %2d %5v" # (new) expert [-I] date format
"%-22n @7v %p %d %c%L %e" # (new) commodore [-z] format
"%-9A %.5B" # (new) commodore [-z] date format
_FILTER:
This is the default hiding filter. The default is *.info and .*
like lsjr. If you give nl -a, these hidden files will be shown.
_STYLEMISC:
These strings allow you to change the style attributes of directories
and links for both long and quick formats. This allows you to say
set directories to be bold when doing a quick output, but say
have them be black on a blue background for long outputs. One can
set the styles for:
Directory color long output mode
Directory link color long output mode
File link color long output mode
Directory color short output mode
Directory link color short output mode
File link color short output mode
Mufs and Envoy User and Group names style
File (non-dir) style
Remember: if you do not like a color than simply change it. If you
dont want any color then make the string empty like ""
_STYLEFILENAMES:
When a filename matches the filename patterns in this section,
a style will be printed. This allows a person to colorize their
directories. For instance a person could set
"*.lha" "\f3\b2"
which will print files ending in .lha in reverse colors. This
feature is similar to the feature found in the program color-ls
for linux.
_STYLEDATATYPES:
When a datatype for a file matches a datatype given in this section,
the filename will be printed in a special style. This allows you
to classify your directories. For instance you can have all pictures
be bold, all sounds be yellow, GIFs be orange, and text file be
reverse colors! To define this section simply put a datatype
followed by a style that should be printed. The datatype can be
ANY of the WB3.0 supported dataypes classes including basename,
groupname, ID, Type, or datatype.
"picture" "\s1"
"sound" "\f3"
_REG:
These are a bunch of miscellaneous strings that have NO ANSI strings.
Whenever you redirect newlists output or turn off ANSI
with [-Z], newlist will use these strings. The misc. strings are:
Long header format
Quick header format
Bad path format
IoErr() error string
Totals
Device: free space
Grand totals
Comment style/form
Pager format
Link separator
Expert mode long header format
Expert mode quick header format
_ANSI:
These are a bunch of miscellaneous strings like in _REG:, but they
have ANSI sequences/color in them. These are the default strings.
See above in _REG: for all the different string types.
_DATES:
These are 8 different date string formats which are selectable with
the newlist flag [-d 0..8]. Editing these strings will make switching
date formats real easy.
_FORMATS:
These are 10 different print formats which are selectable with the
newlist flag [-f 0..9]. Editing these strings will make switching
print formats real easy. It is especially useful now that datatypes
and networking bits are supported.
_SHORTHELP:
Upto 35 strings describing all the flags of newlist. Shorthelp
is designed to be small and less confusing for novice users.
Shorthelp comes up on a single ?...ie nl ? or nl -?
_LONGHELP:
Upto 35 strings describing all the flags of newlist. It comes up when
you do 'nl -??' or nl '??'. If your native language requires more
than 35 strings, then you can concat strings together and add newlines
in between them. Just make sure that the length of the entire line
is less than 256 chars.
ie "line1\nline2\nline3\n"
is: line1
line2
line3
_DIR:
These 2 strings define the abbreviation for directory. The first
must be padded to 8 chars and the second must be 4 chars.
_BREAK:
The string printed when a person breaks newlist with CTRL-C
_MATCH:
The 2 strings printed when a file doesn't match a pattern or
no files are found in hunt mode.
_COMMENT:
The 2 strings printed telling you that the file has a comment attached
to it. The first is a lengthy for used with '%C' which is "Comment"
and the second is a short form used with '%c' which is 'c'
_LOWMEM:
Printed when newlist is out of memory.
_EXEC:
Two strings printed when newlist is executing a string with [-E].
The first is a simple header saying 'Executing: xyz' The
second is the error message when a program or format fails to run.
_UNKNOWN:
Printed when a link cannot be found/translated.
_MONTHS:
The 12 months of the year.
_DAYS:
The 7 days of the week and 4 misc days: tomorrow, today, yesterday,
and future.
_CENTER:
This optional format allows you to define the centered day names
yourself if your native language has day names longer than 9 chars.
If this section isn't defined, then newlist will auto-center the
days found in the _DAYS: section.
=======================
WB2.0 tip O' the day 1:
=======================
Do you miss the really fast scroll displays of wb1.3? I've found
a way to get them back! You can open a shell that disables the
super-auto-refresh and console cut-and-paste to increase scrolling
speed by 20+%! Do the following to open a WB1.3 style fast shell:
newshell CON:0/0/640/200/PhilDOS/CLOSE/SMART
^
this is the secret!
To gain even more speed, use a 2 color public screen and close WB.
=======================
WB2.0 tip O' the day 2:
=======================
Wish your shell had more than 80 columns? Now you can use any size
font with WB2.0's neat new command setfont. Try this out:
setfont topaz 7 scale and setfont topaz 20 scale
^ ^
this is the secret! -----------+
NewList will recognize the new font and will adjust its output!
Try the 7 point font and nl -q. Cool huh!
======
TIP 3:
======
Want newlist to run like ls or lsjr? Simply use the supplied aliases
found in the file called 'scripts/aliases'
======
TIP 4:
======
Do you use the Shareware/PD program CSH for your shell? If you do then
you must use a special newlist alias for newlist to run right. The alias
tells csh to NOT expand wildcards like it does. Add this line to
your s:Shell-startup:
alias nl "*a c:nl $a"
==========================
How to install Newlist8.2:
==========================
0) If you have old newlist's installed:
nl -K
resident c:nl remove
1) From cli
copy newlist82 (or newlist82.030) to c:nl
copy s/NEWLIST.config.language to s:NEWLIST.config
2) From workbench
click the Install-Newlist82 icon
You may also want to add 'RESIDENT c:nl PURE ADD' to your s:user-startup
You may also want to install some of the VERY handy aliases that
emulate ls, lsjr, dr, etc. to your s:Shell-Startup and s:wshell-startup
As soon as you install newlist, edit the S:NEWLIST.config file to
suit your preferences.
===========
Final Note:
===========
Enjoy. Keep in mind: this is a super useful tool!
It's like one of those 1001 in 1 cooking tools.
"Flip the lever, and now it makes
julienne style potatoes! [clap....clap] You get the
slicer, the dicer, the juicer, and turkey jerky maker
for only $49.95! But wait there's more......"
Oh my....I've lost my mind :-)
Register and recieve unlimited updates, your name in my docs,
and an 'Official' shareware patron certificate to show
off to all of your friends!
Mail comments, tips, bug reports, new features, new languages files,
and donations to:
Remember MANDATORY registration this time...send a couple bucks.
Phil Dietz -- NCEMRSoft EMAIL: pdietz@cse.unl.edu
PO Box 306
Yutan, Nebraska 68073
USA