]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-count.rst
emacs: Add new option notmuch-search-hide-excluded
[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 .. program:: count
28
29 .. option:: --output=(messages|threads|files)
30
31    messages
32      Output the number of matching messages. This is the default.
33
34    threads
35      Output the number of matching threads.
36
37    files
38      Output the number of files associated with matching
39      messages. This may be bigger than the number of matching
40      messages due to duplicates (i.e. multiple files having the
41      same message-id).
42
43 .. option:: --exclude=(true|false)
44
45    Specify whether to omit messages matching search.exclude\_tags from
46    the count (the default) or not.
47
48 .. option:: --batch
49
50    Read queries from a file (stdin by default), one per line, and
51    output the number of matching messages (or threads) to stdout, one
52    per line. On an empty input line the count of all messages (or
53    threads) in the database will be output. This option is not
54    compatible with specifying search terms on the command line.
55
56 .. option:: --lastmod
57
58    Append lastmod (counter for number of database updates) and UUID
59    to the output. lastmod values are only comparable between
60    databases with the same UUID.
61
62 .. option:: --input=<filename>
63
64    Read input from given file, instead of from stdin. Implies
65    ``--batch``.
66
67 SEE ALSO
68 ========
69
70 :any:`notmuch(1)`,
71 :any:`notmuch-config(1)`,
72 :any:`notmuch-dump(1)`,
73 :any:`notmuch-hooks(5)`,
74 :any:`notmuch-insert(1)`,
75 :any:`notmuch-new(1)`,
76 :any:`notmuch-reply(1)`,
77 :any:`notmuch-restore(1)`,
78 :any:`notmuch-search(1)`,
79 :any:`notmuch-search-terms(7)`,
80 :any:`notmuch-show(1)`,
81 :any:`notmuch-tag(1)`