DD - Directory Scanner 1.0 (c) 1993 Martin Mares, MJSoft System Software ============================================================================ Preface ======= DD and its documentation is Copyright (c) Martin Mares, MJSoft System Software, Prague, Czech Republic. This archive can be freely redistributed, as long as all of its files are included in their original form without any additions, deletions or modifications, and no more than a nominal fee is charged for its distribution. All copyright notices in the programs and accompanying documentation files must remain on their places. Also '.displayme' and other similar files may not be added. This is generally known as FREEWARE. Special permission is given to Fred Fish to distribute this program on his "Fish Disks". This software is provided "AS IS" without warranty of any kind, either expressed or implied. The author is not responsible for any damage caused by it. Contents ======== 1. Introduction 2. Command line syntax 3. Display options 4. Analysis options 5. Sort options 6. Other options 7. Abbreviations 8. Output format 9. Statistics 10. Remarks 1. Introduction =============== DD is something like DIR or LIST. But it does much more. It can use many different types of file lists, sort file lists, analyse file contents, display statistics, search for identical files and so on. Unless otherwise specified, DD scans and displays full subdirectory structure. DD can work in two modes: quick and normal. Quick mode uses direct access to the disk and is significantly faster, but it can be used only with standard Amiga formats (OFS and FFS). DD will choose this mode automatically whenever it's possible. Normal mode uses standard DOS calls and can be used with any filesystem. You can force DD to use this mode using option NOFAST. DD requires kickstart 1.0 or higher and the arp.library (true arp, it doesn't work with suspicious arp replacements for kickstart 2.0). File analysis requires the analyser.library, which is included in this archive. 2. Command line syntax ====================== DD can be run only from CLI, not from Workbench. All parameters are supplied in the command line in one of following formats: (1) DD [] (lists current directory) (2) DD [] (lists specified directory) (3) DD [] (find files, which match the pattern) (4) DD [] (analyse specified file) - If you want to search for one file, you can specify it using character classes. For example: file "Columns" can be found using "Column[s]". DD also supports definition of a default environment variable called DDOPT (both standard and ARP variables). You can store your favourite options to this variable and DD will use them as defaults. The defaults can be overriden by command line options (if you have DDOPT=sort n and you wish to sort by size, simply enter DD sort s). Default switches can be disabled using '-' followed by switch name (for example DD -HIDESUB)). 3. Display options ================== You can use any of following display options: (1) NAMES - Display only file names. Followed by type of names: R (Relative) - display names with path relative to current dir. F (Full) - display file names with full path. P (Plain) - display only file names (2) COL - Display file names in columns. Directories will be enclosed in '[' and ']'. (3) LFORMAT - User-defined display type. Followed by string, which describes this format. String can contain: %f (Full) - insert file name with full path on this place %r (Relative) - insert file name with relative path %s - same as %r (for compatibility with LFORMAT option in LIST command) %p (Plain) - insert file name without path %a (Analysis) - insert result of analysis %c (Comment) - insert file comment %% - Insert single '%' character (4) QUIET - Don't display any file list. (5) TREE - Display files and directories with "tree" structure. (6) - Default is the full display. It consists of file/dir names in the first column, sizes (or or if it's a directory) and comments. In the "comments" column can be displayed standard filenotes (introduced by the ":" sign) or the analysis results. - Empty directories won't be displayed in pattern searching mode. The file/directory links (with kickstart 2.0 or higher) are displayed only in modes (5) and (6), but they are properly included in the final statistics independently on their visibility. 4. Analysis options =================== If you decide to use the analysis, you should specify your requirement by using "ANA" option followed by single letter indicating the type of the analysis and (optionally) by the list of letters specifying requested analysis reports. Types of analysis: (for better informations on speed see the Speed Statistics section) (1) S (Simple) - analyses only file names. It may cause some mistakes in analysis result (for example if you have an executable file named ghost.asm). But it's very fast - it adds only few seconds to the directory scan time. (2) C (Contents)-analyses only file contents. It is the most reliable method of analysis, but it doesn't find all file types. It's very slow in Normal mode (because a lot of file operations must be done). (3) G (Good) - mostly analyses only file names, but if it doesn't give any usable result, the file contents analysis is used. Faster than Contents mode. (4) F (Full) - both analysis methods (file names and file contents) are used. Then the analyser selects better of the results. These analysis types can be followed by the 'R' (Reliable) option. It disables all non-reliable analysis results (PCX Picture etc.). Types of reports: (1) S (Stat) - display all used file types in alphabetical order, followed by number of files of this type and percentage. (2) Q (Quantity) display all used file types as in S(tat) report, but sorted in quantity order. (3) M (Max) - as Q(uantity) report, but displays only file types with number of files greater than 5 percent of scanned area. (4) D (Dir) - display mostly used file type in each directory. Can be used only in default display mode. (5) Y (System) - analyse system files. Test, if they are present on the system disk. 5. Sort options =============== Sorting can be switched on using the SORT option followed by a string, which describes sort order. The string consists of letters specifying data items, which can be prefixed by the '^' character indicating reverse sort order. (1) D (Dirs) - sort directories first, files last. (2) S (Size) - sort files incrementally by the size. Directories are sorted by size of their contents in the STAT mode, else are placed first (their size is assumed as 0) (3) N (Name) - sort by file name. (4) E (Ext.) - sort by file extension (file name part after '.'), files without extension are at first places. (5) P (Path) - sort by file name with full path. (6) A (Analysis)-sort by analysis result, files without analysis report are at last places. 6. Other options ================ (1) NOFAST - don't use Quick mode. Mostly usable for speed comparisons. Also can be used if the Quick mode doesn't work (it should NOT happen). (2) NOHEAD - don't print the header and footer of the dump. (3) HIDESUB - don't display contents of subdirectories. (4) STAT - display size of files in subdirectories. Only for Full display mode. (5) BYTES - display all file/media sizes in bytes instead of KB or MB (choosen automatically) (6) DIRS - display names of subdirectories in the dump. (7) MERGE - merge all subdirectories to the main directory. Can be used to sort ALL files by size and so on. (8) NOCOM - don't scan file comments. (9) FIDENT - find identical files on the disk. (10) ANAFILT - use analysis filter. Display only files with analysis result matching given pattern. Don't forget that '*' sometimes has special meaning in ARP argument parsing. 7. Abbreviations ================ The most of options can be abbreviated: NOFAST -> NF NOHEAD -> NH ANAFILT -> AF NAMES -> N COL -> C LFORMAT -> L QUIET -> Q TREE -> T STAT -> ST HIDESUB -> H BYTES -> B SORT -> S ANA -> A DIRS -> D MERGE -> M NOCOM -> NC FIDENT -> FI 8. Output format ================ DD output consists of: (1) The header in form "Analysis of on volume " - directory name - volume name (2) The subheader in form "Device: ,, - Size - Free " - name of device which contains the volume - identification of used file system OFS - standard (old) file system FFS - FastFileSystem OFS-I,FFS-I - international version of OFS/FFS OFS-C,FFS-C - directory cache version of OFS/FFS FFS-1K - FastFileSystem with 1K data blocks (RAM: on 2.0) MSDOS - MSDOS File System (CrossDos ...) MSDOS/DD - MSDOS File System with Double Stepping (5.25", DD) ?FS - unknown file system /QUICK - Quick mode will be used - access type READ/WRITE - you can do everything you can READ ONLY - you can only READ this volume NOT VALIDATED - this volume is not validated, the volume free space information isn't available - volume size in bytes (or KB or MB) - free volume space in bytes (/KB/MB) and percents of the volume capacity (3) The file list in format selected by Display options (4) The analysis reports selected by Analysis options (5) The analysis statistics (if there's any analysis report), which contains number and percentage of classified files. (6) The system files analysis report. It's a list of system modules (libraries, devices, handlers, ...) found in scanned area. Each of the files can be described by: Length: - file size Id: - resident module identification string SysId: - id. string of this module on the system disk (displayed only in some cases) Version: - resident module version It is followed by a message saying something about presence of this file on your system disk. On the end, there can be a final classification if there's some file newer than on your system disk or if DD can't say it's same or older. (7) The file identity report. It consists of a list of empty files and a list of duplicates followed by statistics saying how many duplicates are there and how many bytes is in them. (8) The final statistics in form " files in dirs - -

% of disk - in slacks" - number of files - number of directories - total size of files

- how many percents of the disk occupies analysed file and directory structure - how many bytes and percents of data area are in "slacks" (Slacks are the fragments of data blocks, which contain no data)

and is displayed only for standard OFS and FFS devices, but not for the 1.3 RAM: device. - the field may contain slightly non-reliable results for disks with 1.3 FFS (especially harddisks), but only when the QUICK mode is not used. 9. Statistics ============= This section describes how fast and how memory intensive are the tasks performed by DD. *** SPEED STATISTICS *** All time values include DD loading time and are measured by the Stat utility with DD in QUIET mode. (These values are for some ancient version of DD, this version should give better results) Pure scanning: Quick Mode Normal Mode Media --------------------------------------------------------------------------- 50.5 s 93.2 s HD,FFS,43M,93% full,5739 files,259 dirs 12.8 s 43.9 s FD,OFS,838K,98% full,124 files,12 dirs 10.4 s 28.9 s FD,OFS,838K,98% full,55 files,19 dirs 14.4 s 69.4 s FD,OFS,838K,79% full,197 files,12 dirs 0.5 s 8.4 s FD,OFS,838K,84% full,2 files,2 dirs 2.2 s 2.3 s FD,FFS,902K,99% full,10 files,2 dirs Sorting of HD (43M,93% full,5739 files,259 dirs): Criteria Sort Time --------------------------------------------------------------------------- Name 9.8 s Extension 15.8 s Path 38.9 s Size 3.7 s Ext,Size 20.9 s Analysis of HD (43M,93% full,5739 files,259 dirs): Analysis Type Quick Mode Normal Mode --------------------------------------------------------------------------- Simple 69.0 s 111.5 s Contents 125.0 s 590.4 s Good 115.8 s 452.3 s Full 143.0 s Simple + Sort 74.4 s Searching for Identical Files (Output to RAM:) Quick Mode Normal Mode Media --------------------------------------------------------------------------- 362.0 s 731.5 s HD,FFS,43M,93% full,5739 files,259 dirs 21.5 s 51.2 s FD,OFS,838K,98% full,124 files,12 dirs *** MEMORY USAGE STATISTICS *** (Measured by the Stat utility, includes size of DD) Pure scanning of HD (43M,93% full,5739 files,259 dirs,Quick): 310218 B Pure scanning of HD (43M,93% full,5739 files,259 dirs): 287566 B Pure scanning of FD (OFS,79% full, 197 files, 12 dirs,Quick): 33612 B Pure scanning of FD (OFS,79% full, 197 files, 12 dirs): 32622 B Any Analysis of HD (43M,93% full,5739 files,259 dirs,Quick): 437690 B Any Analysis of HD (43M,93% full,5739 files,259 dirs): 415038 B FIDENT on HD (43M,93% full,5739 files,259 dirs,Quick): 442130 B FIDENT on HD (43M,93% full,5739 files,259 dirs): 314662 B 10. Remarks =========== - Send all comments and bug reports to mjsoft@k332.feld.cvut.cz. ??? IN FUTURE VERSIONS ??? - There will be some output buffers -> faster output. - Analyser will recognise more file types. - Report of the FIDENT option will be sorted by file name instead of file size. - There will be some file output (?) *** THANKS *** - To Vojtech Pavlik for some ideas in his DD for PC. - To Tomas Zikmund, Pavel Troller, Petr Cisar, Karel Zatloukal, Jan Kratochvil and many other people for beta-testing and suggestions. - To Amiga hardware for all... - To Amiga operating system for his geniality. - To BCPL for a lot of suspicious things. - To the slow movement of drive heads for the idea of my caching algorithms. *** END *** ================================================================================