home *** CD-ROM | disk | FTP | other *** search
-
- FIND, Copyright © 1989, by Larry Phillips.
-
- This program may be freely distributed, in its entirety only,
- including updatedb, find, and find.doc. No chage may be made for
- this program beyond a reasonable media charge. It may be distributed
- on any public or private BBS or telecommunication service, provided
- there are no extra charges for downloading, beyond normal connect
- time fees.
-
- If you use find, and like it, if it saves you time, or if you have
- comments, criticisms or a wish list, please send me a postcard from
- where you live. Consider the cost of the postcard and stamp a
- shareware fee. If I could include the card and stamp in the
- distribution, I would.
-
- Send to:
-
- Larry Phillips
- 3575 E. 28th Ave.
- Vancouver, BC, Canada
- V5R 1T4
-
- -------------------------------------------------------------
-
- UPDATEDB: creates the files used by find
- ---------
-
- Updatedb will create a file called 'find.codes' in a directory
- called 'FindDB:'. It will take a while, so don't panic (it takes
- about 4 1/2 minutes on my setup, but the time taken will depend
- entirely on how many directories and files you are catalogging). The
- file created will only match the actual contents of your partitions
- until you save, delete, or move files around, but it is a simple
- matter to run updatedb once a day (more or less, depending on your
- disk activity, and how long you can remember the changes you make on
- your disks).
-
- Syntax: updatedb [ [-v] dhn: dhn: ...]
-
- dhn: device name.
-
- -v: verbose mode. This is a debuggin feature for updatedb, in
- case you have a problem with a partition or filename. It
- will show you which directory it was working on when it
- failed. The directory names are sent to the screen,
- delimited with vertical bars ('|'), in a different colour.
- The -v option is used only when entering the partition names
- on a command line.
-
- Examples: updatedb ; take arguments from FindDB:find.config
- updatedb dh0: dh1: ; catalog dh0: and dh1:
- updatedb -v dh1: ; catalog dh1:, verbose.
-
- If you specify partitions on the command line, they will be used to
- generate the find.codes file. If you don't specify partitions,
- updatedb will look for a file in your 'FindDB:' directory called
- 'find.config'. This file should have _only_ one line in it,
- consisting of the partitions you want to include in the catalog,
- separated by spaces. In either case, the last partition named in
- 'find.config' or on the command line will be the first one processed,
- so you should put them in order of least likely to most likely to be
- searched.
-
- updatedb may be stopped by typing a CTRL C. It will stop after
- processing the directory it is working on.
-
-
- find.codes: This is a straightforward file, consisting of directory
- names and file names, separated by NULL bytes. (hex 00). Directory
- names will always end with a colon (':') or a slash ('/'). The order
- is as follows:
-
- dirname/ NULL filename NULL filename NULL dirname/ NULL filename NULL ...
-
- =================================
-
- FIND: find files and directories on hard disk
- -----
-
- Find uses a database file called 'find.codes', to quickly find any
- directory or file. These two files are created by the companion
- program 'updatedb'.
-
- Output from the program may be halted at any time by pressing
- CTRL C. I debated a long time on where to check for the CTRL C, for
- speed considerations,and finally decided to check only when a match
- was detected, and right after the directory search. This means
- that the directory will be completely searched if there are no
- matches. It ends pretty quickly anyway (see comments on speed
- below).
-
- Syntax: find [-e] string
-
- string : the string to match. Without the '-e' argument, the
- string need only be contained in the directory or file
- entry. For example, the string 'game' will match
- 'game', 'games', or 'endgames'. See '-e' below for
- exact matches.
-
- -e : Optional, [E]xact. Matches directories and filenames
- only if the string argument matches exactly. For
- example, the argument 'game' will not match a directory
- or file named 'games'
-
- =================================
-
- Setting it up
- -------------
-
- Find and updatedb contain a few 'hardwired' assumptions.
-
- The first assumption: I have an assigned directory called 'FindDB:'
- You can set up a directory like this, and make the assignment, or if
- you wish to have your find files elsewhere, use a file zapper to
- change the path/filename in both programs. I welcome suggestions on
- how best to set up the configurability.
-
- The second assumption is only in updatedb, and that is that if no
- command line arguments are given, it looks for them in
- 'FindDB:find.config'
-
- =================================
-
- Everyday usage:
- ---------------
-
- I usually run updatedb once per day, either before going to bed or
- before going to work. It would be a good candidate for putting in a
- crontab to run at some time you will not be using the machine.
-
- Find is extremely fast, especially when compared with searching a
- disk with DIR or LIST. If I invoke it with a string that I know will
- not be found (eliminating screen output time), it will do a complete
- search in between 2 and 7 seconds, depending on the length of the
- pattern searched for (longer patterns take less time). Before you
- groan and tell me that isn't fast, let me tell you about my find
- files and disk partitions...
-
- My FindDB:find.codes is 133351 bytes long, consisting of 1174
- directory entries and over 10,000 file entries
-
- If you are anything like me, you forget where things are, and
- waste a lot of time looking for them. On my current setup, it would
- take me over 5 minutes to do a 'dir all' of all partitions, and more
- time still to search the output for the file I want. The disk space
- overhead in having the find files is quite small.
-
- =================================
-
- Enjoy!
-
- Larry Phillips: CIS - 76703,4322
- Usenet - lphillips@lpami.wimsey.bc.ca
- or uunet!van-bc!lpami!lphillips
-