| 1 |
grepmail 5.3111 |
| 2 |
|
| 3 |
usage: |
| 4 |
|
| 5 |
grepmail [--help|--version] [-abBDFhHilLmrRuvVw] [-C <cache-file>] |
| 6 |
[-j <status>] [-s <sizespec>] [-d <date-specification>] |
| 7 |
[-X <signature-pattern>] [-Y <header-pattern>] |
| 8 |
[-e] <pattern> <files...> |
| 9 |
|
| 10 |
grepmail [--help|--version] [-abBDFhHilLmrRuvVw] [-C <cache-file>] |
| 11 |
[-j <status>] [-s <sizespec>] [-d <date-specification>] |
| 12 |
[-X <signature-pattern>] [-Y <header-pattern>] |
| 13 |
-E <expr> <files...> |
| 14 |
|
| 15 |
grepmail [--help|--version] [-abBDFhHilLmrRuvVw] [-C <cache-file>] |
| 16 |
[-j <status>] [-s <sizespec>] [-d <date-specification>] |
| 17 |
[-X <signature-pattern>] [-Y <header-pattern>] |
| 18 |
-f <pattern-file> <files...> |
| 19 |
|
| 20 |
At least one of -s, -d, -u, -e, and -E must be specified, and can appear in |
| 21 |
any relative order following the other flags. The -e flag is optional if |
| 22 |
pattern appears immediately before -s or -d. Files can be plain ASCII or ASCII |
| 23 |
files compressed with gzip, bzip2, lzip, or xz. -E allows for complex pattern |
| 24 |
matches involving logical operators. If no file is provided, normal or |
| 25 |
compressed ASCII input is taken from STDIN. |
| 26 |
|
| 27 |
-a Use received date instead of sent date for -d matching |
| 28 |
-b Search must match body |
| 29 |
-B Print message bodies but with only limited headers |
| 30 |
-C Specify the location of the cache file |
| 31 |
-d Specify a required date range (see below) |
| 32 |
-D Debug mode |
| 33 |
-e Explicitly name pattern (when searching for strings beginning with "-") |
| 34 |
-E Specify a complex search expression |
| 35 |
-f Read patterns from a file |
| 36 |
-F Force processing of all data as mailboxes |
| 37 |
-h Search must match header |
| 38 |
-H Print headers but not bodies of matching emails |
| 39 |
-i Ignore case in the search expression |
| 40 |
-j Search must match status (A=answered, R=read, D=deleted, O=old, F=flagged) |
| 41 |
-l Output the names of files having an email matching the expression |
| 42 |
-L Follow symbolic links (implies -R) |
| 43 |
-M Do not search non-text mime attachments |
| 44 |
-m Append "X-Mailfolder: <folder>" to all headers to indicate in which folder |
| 45 |
the match occurred |
| 46 |
-n Print the line number info (and filename if necessary) for the emails |
| 47 |
-q Quiet mode -- don't output warnings |
| 48 |
-r Output the names of the files and the number of emails matching the |
| 49 |
expression |
| 50 |
-R Recurse directories |
| 51 |
-s Specify a size range in bytes (see below) |
| 52 |
-S Ignore signatures |
| 53 |
-u Ensure that no duplicate emails are output |
| 54 |
-v Output emails that don't match the expression |
| 55 |
-V Display the version number |
| 56 |
-w Match word boundaries |
| 57 |
-X Specify a regular expression for the signature separator |
| 58 |
-Y Specify a header to search (implies -h) |
| 59 |
--help Print a help message |
| 60 |
|
| 61 |
Date constraints require Date::Parse. Date specifications must be of the |
| 62 |
form of: |
| 63 |
- a date like "today", "1st thursday in June 1992" (requires Date::Manip), |
| 64 |
"05/18/93", "12:30 Dec 12th 1880", "8:00pm december tenth", |
| 65 |
- "before", "after", or "since", followed by a date as defined above, |
| 66 |
- "between <date> and <date>", where <date> is defined as above. |
| 67 |
|
| 68 |
Size constraints must be of the form of: |
| 69 |
- 12345: match size of exactly 12345 |
| 70 |
- <12345, <=12345, >12345, >=12345: match size less than, less than or equal, |
| 71 |
greater than, or greater than or equal to 12345 |
| 72 |
- 10000-12345: match size between 10000 and 12345 inclusive |