find(3)
[Home]
[Commands]
[Variables]
[Macro-Dev]
[Glossary]
NAME
SYNOPSIS
DESCRIPTION
find performs a search for files in the current directory (or from starting-path) using built in MicroEmacs 2009 constructs rather than relying on any external executables such as find(1). find operates in exactly the same way as a traditional find command line utility and uses a command line option sequence from the MicroEmacs 2009 command line. The file-options allow recursive and regular expression searches, searching against the file modification time etc. The command line takes the user supplied file-options, file-mask and starting-path. The output of the command is piped into the *find* buffer.
find-options
Defines the options that are specified on the command line, the default options may also be defined with the file-setup(3) command invoked from the command line or from the the Tools menu. The find-options are defined as follows:
-2
List the file and directory attributes in the output (directory list sort key)
-3
List file and directory size in the output.
-4
List file and directory modified time in the output.
-a
Re-read all out of date buffers, prevents a manual prompt, equivalent of Yes to all. This is the inverse of -o
-b
-B
Do not ignore binary files.
-d
List directories or grep in directory listings.
-D
Do not list directories or grep in directory listings.
-f
-F
Do not list/search files.
-g
File masks are regex (i.e. .*.emf)
-G
File masks are not regex (i.e. *.emf)
-i
Ignore search pattern case (case insensitive).
-I
Do not ignore search pattern case (case sensitive).
-l
Use existing buffer of loaded files.
-L
Do not use existing buffer of loaded files.
-m
Search pattern is a regular expression.
-M
Search pattern is not a regular expression.
-o
Do not re-read all out of date buffers, prevents a manual prompt, equivalent of No to all. This is the inverse of -a.
-p
-P
Starting path not specified
-r
Recurse into sub-directories
-R
Do not recurse into sub-directories
-S <size>
File size - less than or equal, the following size formats are supported:
-S <number> File size specified bytes.
-S <number>k File size specified in Kilobytes.
-s <size> File size greater than; supported size formats are the same as -S.
-T <time>
Modification time - older than, the following time formats are supported:
-T yy-mm-dd
-T yyyy-mm-dd
-T yyyy-mm-dd hh:mm:ss
-T days Offset time in days from midnight this morning, e.g. -T 0 would match all files not modified today.
-T days.hours[.minutes[.seconds]] Offset time in , e.g. -T 1.1.30 matches all files 25 hours and 30 minutes old.
Note that -T 1 is not the same as -T 1.0, except at midnight.
-t <time>
Modification time - newer than or equal, supported time formats are the same as -T.
-u
When used with -w, allows the file size limit of 100Mb to be disabled and strings are searched in files of any size.
-U
When used with -U, files are limited in size 100Mb otherwise they will not be searched.
-w <search-pattern>
File must contain a string matching the given search-pattern.
-x
-X
file-mask
The files to search for e.g. *.txt
starting-path
The directory location where the search should commence. The default is the location of the current buffer.
file-setup invokes a dialogue and allows the default file-options to be specified when the find command is invoked.
NOTES
- Directories are not considered binary files, so -b will not exclude them.
- The default when no options are given will be -XGPrdfMIBL, default options can be set via the find-setup command (sets the /history/find-com registry entry).
- Use of -w on directories searches for <search-pattern> within the MicroEmacs 2009 directory listing, the command is then the same as
grep(3) except for the output buffer format.
- String searches of -w are not performed on files that exceed 100Mb unless the -u option is specified on the command line. This prevents MicroEmacs 2009 from loading exceptionally large files unless explicitly required.
SEE ALSO
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12