1NOTMUCH-COUNT(1) notmuch NOTMUCH-COUNT(1)
2
3
4
6 notmuch-count - count messages matching the given search terms
7
9 notmuch count [option ...] <search-term> ...
10
12 Count messages matching the search terms.
13
14 The number of matching messages (or threads) is output to stdout.
15
16 With no search terms, a count of all messages (or threads) in the data‐
17 base will be displayed.
18
19 See notmuch-search-terms for details of the supported syntax for
20 <search-terms>.
21
22 Supported options for count include
23
24 --output=(messages|threads|files)
25
26 messages
27 Output the number of matching messages. This is the de‐
28 fault.
29
30 threads
31 Output the number of matching threads.
32
33 files Output the number of files associated with matching mes‐
34 sages. This may be bigger than the number of matching
35 messages due to duplicates (i.e. multiple files having
36 the same message-id).
37
38 --exclude=(true|false)
39 Specify whether to omit messages matching search.exclude_tags
40 from 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,
45 one per line. On an empty input line the count of all messages
46 (or 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 data‐
52 bases with the same UUID.
53
54 --input=<filename>
55 Read input from given file, instead of from stdin. Implies
56 --batch.
57
59 notmuch, notmuch-config, notmuch-dump, notmuch-hooks, notmuch-insert,
60 notmuch-new, notmuch-reply, notmuch-restore, notmuch-search,
61 notmuch-search-terms, notmuch-show, notmuch-tag
62
64 Carl Worth and many others
65
67 2009-2023, Carl Worth and many others
68
69
70
71
720.38 Sep 12, 2023 NOTMUCH-COUNT(1)