]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-count.rst
Import notmuch_0.27.orig.tar.gz
[notmuch] / doc / man1 / notmuch-count.rst
1 =============
2 notmuch-count
3 =============
4
5 SYNOPSIS
6 ========
7
8 **notmuch** **count** [*option* ...] <*search-term*> ...
9
10 DESCRIPTION
11 ===========
12
13 Count messages matching the search terms.
14
15 The number of matching messages (or threads) is output to stdout.
16
17 With no search terms, a count of all messages (or threads) in the
18 database will be displayed.
19
20 See **notmuch-search-terms(7)** for details of the supported syntax for
21 <search-terms>.
22
23 Supported options for **count** include
24
25 ``--output=(messages|threads|files)``
26     **messages**
27         Output the number of matching messages. This is the default.
28
29     **threads**
30         Output the number of matching threads.
31
32     **files**
33         Output the number of files associated with matching
34         messages. This may be bigger than the number of matching
35         messages due to duplicates (i.e. multiple files having the
36         same message-id).
37
38 ``--exclude=(true|false)``
39     Specify whether to omit messages matching search.tag\_exclude from
40     the count (the default) or not.
41
42 ``--batch``
43     Read queries from a file (stdin by default), one per line, and
44     output the number of matching messages (or threads) to stdout, one
45     per line. On an empty input line the count of all messages (or
46     threads) in the database will be output. This option is not
47     compatible with specifying search terms on the command line.
48
49 ``--lastmod``
50     Append lastmod (counter for number of database updates) and UUID
51     to the output. lastmod values are only comparable between
52     databases with the same UUID.
53
54 ``--input=``\ <filename>
55     Read input from given file, instead of from stdin. Implies
56     ``--batch``.
57
58 SEE ALSO
59 ========
60
61 **notmuch(1)**,
62 **notmuch-config(1)**,
63 **notmuch-dump(1)**,
64 **notmuch-hooks(5)**,
65 **notmuch-insert(1)**,
66 **notmuch-new(1)**,
67 **notmuch-reply(1)**,
68 **notmuch-restore(1)**,
69 **notmuch-search(1)**,
70 **notmuch-search-terms(7)**,
71 **notmuch-show(1)**,
72 **notmuch-tag(1)**