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