home *** CD-ROM | disk | FTP | other *** search
- TurboList v0.07 alpha (3-Jun-95)
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- coded by Conrad Sanderson
- (e-mail: g.sanderson@ais.gu.edu.au)
-
- Mail me with bug reports or suggestions...
-
-
- TABLE OF CONTENTS
- ~~~~~~~~~~~~~~~~~
- 0. Legal Notice
- 1. Requirements
- 2. Quick Overview
- 3. List of features
- 4. Why is it faster?
- 5. It's still experimental
- 6. Options
- 7. Aliasing
- 8. History
- 9. To do
-
-
- 0. LEGAL NOTICE
- ~~~~~~~~~~~~~~~
- TurboList is (c) Copyright 1995 Conrad Sanderson.
-
- This program can be distributed and used freely, as long as the following
- conditions are satisfied:
-
- (a) it is not modified in any way
- (b) it is not stored on, or transferred from/to,
- any device which is property (whole or partially)
- of Microsoft or any of its subsidiaries.
-
- Failure to follow these points results in a breach of copyright.
-
-
- 1. Requirements
- ~~~~~~~~~~~~~~~
- At least Kickstart 2.04 (v37.175)
-
- The 68020 version requires at least a 68020 processor (ie. Amiga A1200,
- CD32, A2500, A3000, A4000 or any machine with a 68020+ accelerator). This
- version has been specifically optimized for 32 bit memory access and 32 bit
- maths and hence is faster than the 68000 version.
-
- The 68000 version can be used on any Amiga, but is best suited for machines
- which only have the 68000 or the 68010 processor (A500, A600, A2000).
-
-
- 2. Quick Overview
- ~~~~~~~~~~~~~~~~~
- TurboList is a command similar to the standard list command supplied with
- AmigaDOS.
-
-
- The normal 'list' command, lists files like this:
-
- etherpeek 2369 ---arwed 04-Jan-95 22:21:34
- alien.iff 1314114 ----rwed 07-Jan-95 01:31:08
- desert.rat.toxic.article.gz 3684 ----rwed 05-Apr-95 17:24:34
- ultoa020.o 444 ----rwed 28-Mar-95 19:11:11
- ftphunt.gz 13768 ---arwed 04-Jan-95 14:27:41
- mui23usr.LZX 504572 ----rwed 26-Mar-95 19:21:54
- electric.bullet 1416 ---arwed 04-Jan-95 22:16:54
- ar311.lha 95557 ----rwed Today 02:44:23
- replacement.functions 1029 ----rwed 11-Mar-93 23:20:17
- 9 files - 3796 blocks used
-
-
- TurboList lists them like this (similar to unix ls):
-
- ---arwed 04-Jan 22:21 2.3K etherpeek
- ----rwed 07-Jan 01:31 1.3M alien.iff
- ----rwed 05-Apr 17:24 3.6K desert.rat.toxic.article.gz
- ----rwed 28-Mar 19:11 444b ultoa020.o
- ---arwed 04-Jan 14:27 13K ftphunt.gz
- ----rwed 26-Mar 19:21 493K mui23usr.LZX
- ---arwed 04-Jan 22:16 1.4K electric.bullet
- ----rwed Tod 02:44:23 93K ar311.lha
- ----rwed 11-Mar-93 1K replacement.functions
- TOTAL: 9 files [1.8M] and 0 dirs [1.9M used, 1M free]
-
-
- As you can see, long filenames do not stuffup the formatting. Additionally,
- where possible, file sizes are approximated to their nearest multiplier (ie.
- Kilobytes, Megabytes or Gigabytes), which is much easier to read. This
- behaviour can be switched off.
-
- The date/time output is also different - if the file was created on the day
- you are listing it, it will print out "Tod hh:mm:ss", where Tod = Today,
- hh = hours, mm = minutes, ss = seconds. If the file was created within 6
- months of Today, the day of the month and the month will be printed, along
- with hh:mm. If the file is older than 6 months, the full date, but no time,
- is printed. This unix-like behaviour can be switched off and the full date
- printed without any conditions.
-
- Additionally, the file sizes are added up and listed at the end (the [1.8M]
- in above example). The actual space taken up by the listed files is also
- printed (ie. 1.9M used) - this is due to the amount of blocks being used
- for a file, and blocks have constant sizes (usually 512 bytes on FFS), hence
- a file which takes up 444 bytes actually takes up 2 blocks, 1 * 512 for the
- file, and 1 * 512 for the directory entry (these values all depend on the
- file system used). The amount of free space (ie. 1M free) on the device is
- also printed.
-
- Files which have the hidden ('h') protection bit enabled will be ignored and
- not taken into account when counting sizes/space taken up. This can be
- switched off.
-
- File size conversion explanation:
-
- K = 1024 bytes (1 Kilobyte)
- M = 1024K (1 Megabyte)
- G = 1024M (1 Gigabyte)
-
- For the file mui23usr.LZX, which is 504572 bytes long, the following
- size conversion is done:
-
- 504572 / 1024 = 492.746 K, or approximately 493 K
-
-
- NOTE: If any of the above values exceed 4 Gigabytes, strange/incorrect
- results will be printed... but not many people have 4 Gigabyte
- drives.
-
-
- 3. List of features
- ~~~~~~~~~~~~~~~~~~~
- - Can be upto 30% faster than the normal 'list' command
- - Long filenames fit without stuffing up the display
- - Approximates the file size so it can be read easily (can be turned off)
- - similar to unix-ls date printing behaviour
- - doesn't display hidden files (with the h bit) (can be turned off)
- - handles patterns (ie. stuff like foobar.#? etc)
- - listing according to dates (since/upto date limitations)
-
-
- 4. Why is it faster?
- ~~~~~~~~~~~~~~~~~~~~
- - grabs 3 filenames before printing them (can be turned off)
- (note: caching filenames may not be desirable when using pattern
- matching on a slow drive... will be fixed later)
- - Turns off the cursor while printing, but turns it back on as soon
- as it has finished printing a set of names. The cursor can be
- configured to remain on at all times.
- - Direct writes (can be forced to use normal printing methods)
-
-
- 5. It's still experimental
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
- - don't expect everything working perfectly
- - a lot of functions are missing when compared to the normal list command
- eg. recursive directories
-
-
- 6. Options
- ~~~~~~~~~~
- The letters after '/' specify the type of argument
-
- /M = multiple strings (keyword doesn't have to be present)
- /S = switch (ie. enable) (keyword has to be present)
- /K = keyword followed by a string
-
- If a keyword (or its shortcut) has the same name as a directory/filename you
- are trying to list, you must use DIR=filename to avoid the conflict.
- Alternatively, you can use UNIX like keywords (see the "-unix" option for
- more information).
-
- DIR/M,
- -h=-?=HELP = ABOUT/S,
- -sh=SH = SHOWHIDDEN/S,
- -co=CO = CURSORON/S,
- -nj=NJ = NOJUMP/S,
- -nd=ND = NODIRECT/S,
- -unix/S,
- -files = FILES/S,
- -dirs = DIRS/S,
- -noda=NODA = NODATES/S,
- -ex=EX = EXACT/S,
- -free = FREE/S,
- -since = SINCE/K,
- -upto = UPTO/K,
- -both = BOTH/S,
- -normd=NORMD = NORMALDATE/S
-
-
- DIR
-
- Name of a directory or a file or nothing (will list current dir). Currently
- tlist can only process one name (no multiple directories).
-
-
- ABOUT, HELP, -?, -h
-
- Print version/date information. In some versions this option may also
- display various debugging information.
-
-
- SHOWHIDDEN, SH, -sh
-
- Show hidden files/directories (h protection bit).
-
-
- CURSORON, CO, -co
-
- Keep the cursor on at all times. Tlist turns the cursor off while printing
- something. If you are using tlist over a comm link (eg. modem link, AUX:,
- null-modem, etc.), your terminal may not be able to interpret cursor on/off
- commands, hence this option.
-
-
- NOJUMP, NJ, -nj
-
- Do not cache filenames - print out filnames as soon as they are read from
- the disk. This can be used if you have a slow drive and are listing
- patterns. Normally tlist caches 3 names before printing them. I'll
- probably change the name of this option to NOCACHE in later versions.
-
-
- NODIRECT, ND, -nd
-
- Use normal printing methods instead of direct writes. Direct writes may
- conflict with some console-handlers (eg. KingCON with Jump Scroll enabled)
- or communication links.
-
-
- -unix
-
- Instructs tlist to use options _only_ which start with '-'. Useful when a
- option has the same name as a dir/file, or you prefer UNIX type keywords.
- Only works properly when it is specified as part of the command line.
-
- (note: even if you do not specify -unix, options starting with '-'
- still work. )
-
-
- FILES, -files
-
- List only files
-
-
- DIRS, -dirs
-
- List only directories
-
-
- NODATES, NODA, -noda
-
- Do not print date/time of files/dirs.
-
-
- EXACT, EX, -ex
-
- Print out the exact size of files (ie. no approximations).
-
-
- FREE, -free
-
- Display the amount of used and free space only. Example:
-
- shell> tlist free dh0:
- [7.1M used, 917K free]
-
- 'dh0:' can be replaced with any filename/directory/device or even omitted.
- If it's omitted, tlist will use the current directory as the argument.
-
-
- SINCE, -since
-
- Limit listing of files to only those which were created since a specified
- date/time. The date/time must be specified in standard AmigaDOS format.
- Examples of valid dates: today, yesterday, thursday (ie. any day of the
- week), 01-Jun-93, 2:08 (ie. hh:mm), 2:08:01 (ie. hh:mm:ss). When specifying
- a time, it will be assumed you are referring to a time which was Today.
-
- UPTO, -upto
-
- Similar to SINCE, but instead it limits listing of files to only those which
- were created upto a specified date/time.
-
-
- BOTH, -both
-
- Print the approximated file size along with the exact size.
- NOTE: this option has a small bug when listing directories.
-
-
- 7. Aliasing
- ~~~~~~~~~~~
- You can alias tlist to have a default behaviour which you want.
- It has to be aliased for every shell window you open (can be part of
- s:shell-startup)
-
- Example1:
- shell> alias tlist tlist showhidden exact
-
- ... and whenever tlist is used, the showhidden and exact options
- will be on.
-
- Example2:
- shell> alias tlist tlist -unix
-
- ... and whenever tlist is used, only options which start with '-'
- will be used.
-
- In later versions tlist will also use environment variables, so the default
- behaviour can be modified globally.
-
-
- 8. History
- ~~~~~~~~~~
- 0.01 tested the theory that print buffering and no cursor would
- speed up directory listing
-
- 0.02 added protection bits
- 0.03 replaced many occurences of mysprintf() with strcat()/strcpy()
- added filestats()
-
- 0.04 added dates
- 0.05 implemented patterns (#?.sfsf#? etc)
-
- 0.06 major code update (read: optimized the crap out of it)
-
- - replaced many occurances of strcat()/strcpy() with
- mystrcpy()/mystrcat() which are much faster... tlist
- now accesses memory much less
-
- - replaced most occurances of mysprintf() (and hence RawDoFmt())
- with mystrcat()/mystrcpy()/mystrputchar()/ultoa()
-
- - due to above changes, tlist now is ~8% faster than last version
-
- added FREE keyword
-
- rearranged filestats(), added total size of files and total space
- used by files
-
- added CPU check for 68020+ version
- 68000 version uses utility.library for 32 bit maths
-
-
- 0.07 reversed order of fields when printing - now looks similar
- to unix ls
-
- modified code to use jump tables instead of checking variables
- all the time when deciding what function to use.
-
- modified filestats() - ignores hidden files completely
-
- modified date output to look like unix ls
-
- modified string handling function again... in time critical
- code, replaced mystrcat() with combinations of mystrputchar(),
- mystrputword(), mystrputlong() - results in smaller and faster
- code
-
- using memcpy() instread of mystrcat() when handling long strings
- results in much less access to memory, hence faster
-
- added SINCE, UPTO, NORMALDATE, and BOTH keywords
-
- modified ultoa() so it can pad generated strings with spaces,
- depending on the length of the generated string. This made
- mysprintf() totally redundant.
-
-
- 9. To do
- ~~~~~~~~
- - show/don't show .info files (hidden by default, SHOWINFO)
- - option for bytes (b) or nothing at the end of file size
- - option for a space between approximated file size and multiplier
- - show files/dirs bigger/smaller according to specified size
- - multiple directories
- - recursive directories
-