home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
varia
/
find
/
find.doc
< prev
next >
Wrap
Text File
|
1977-12-31
|
9KB
|
194 lines
============================================================
$VER: find.doc 36.2 (17.1.96) Copyright (c) Ralph Seichter
============================================================
DESCRIPTION
I wrote 'find' because I needed a tool to find files (obviously :) which
match a given name pattern. 'find' is able to search multiple directories,
including all subdirectories, the current directory and its subdirs, or the
current CLI command path only. The output can be formatted in a way which
tries to imitate 'List LFORMAT' behaviour, and you can make 'find' create
shell scripts for you and execute them on the fly.
Please note that 'find' is pure, you can make it resident. As it is less
than 3 KB in size, this is recommended. Check the executable by using the
List command (you should see output like the following line) and modify the
file protection bits if necessary:
find 2760 --p-rwed 17-Jan-96 16:45:55
Requires 'dos.library' V36 (OS 2.0) or better.
COPYRIGHT NOTICE
This program is Copyright (c) 1996 Ralph Seichter, all rights reserved.
You may however freely use it and give copies to your friends, as long as
you don't add data to or remove data from the distribution archive. You may
*NOT* include any part of the distribution archive in a commercial software
package. If you have comments or suggestions, feel free to contact me. Use
PGP-encrypted Email when possible, you can find my public key at the end of
this file.
Ralph Seichter Email: zodiac@darkness.gun.de
Am Christenrain 12
56479 Stein
Germany
USAGE EXAMPLES
Locate all C source files on partition DH1:
-> find #?.c dh1:
Find all Icons in the current directory and all its subdirs, but
don't display the ".info" suffix.
-> find #?.info lformat %m
Print file name stems and extensions as a formatted table.
-> find #? RAM: lformat "%-20N|%3.3e"
Get rid of all files with the prefix "foo" on some partitions, but
don't go deeper than three subdirectory levels while scanning.
-> find foo#? sys: dh2: bozo: depth=3 lformat="delete %p%n" exec
Find 'Type' in the command path.
-> find Type path
Find all occurences of 'bar' in the command path.
-> find bar full
I hope that these few examples show some of the potential of 'find'. The
possibility to create shell scripts and have them executed without further
interaction is certainly very useful for many tasks.
COMMAND TEMPLATE
PATTERN/A Any OS name pattern, i.e. "#?.info".
DIRECTORY/M List of directories to scan. If omitted, only the current
directory and its subdirectories will be searched.
DEPTH/K/N Number of subdirectory levels (recursion depth). DEPTH=0
means no subdirs, DEPTH=1 one subdir level, and so on.
LFORMAT/K Format string (%[flags][width.limit][length]type). You can
use a subset of the templates known from 'List LFORMAT' to
modify the output. As an example, a file "DH0:Foo/Bar.c"
shall be used.
%e Name suffix .c
%f Full path and name DH0:Foo/Bar.c
%m Name without suffix Bar
%N Full name Bar.c
%n Full name (lowercase) bar.c
%p Fully qualified path DH0:Foo/
%% Percent sign %
LFORMAT defaults to %f (full path and name).
EXEC/S Create shell script using the given LFORMAT string. You
must specify LFORMAT, or EXEC will be ignored.
FULL/S Check full command path instead of stopping with the first
match (FULL implies PATH).
PATH/S Find first matching file in the current CLI command path.
VERBOSE/S Print the names of all directories when they are scanned.
DISCLAIMER
THIS MATERIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT LIMITATION
ANY IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE USE, RESULTS, AND
PERFORMANCE OF THIS MATERIAL IS ASSUMED BY YOU AND IF THE PRODUCT SHOULD
PROVE TO BE DEFECTIVE, YOU ASSUME THE ENTIRE COST OF ALL NECESSARY
SERVICING, REPAIR, OR OTHER REMEDIATION.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2i
mQBNAi7dDgAAAAECANd1hBXK8RLHVmJxmhuq6hFS1HBIPHC7YImTZFs10d3FfQFe
63xBabCJxzQh06ODARdYuE7i9PfKqxQX9aw2mMEABRG0J1JhbHBoIFNlaWNodGVy
IDx6b2RpYWNAZGFya25lc3MuZ3VuLmRlPokAlQIFEDDcBnKSm5QEVx+OOQEBvgkD
+QHUNzE/Fv7fGdsptPSQhMzifIW4HAta1QjPP//J29rf2aGmfRVK6CmsYomlsEAz
9rMbTv9EoUI+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