]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-count.1
man: document notmuch count --batch and --input options
[notmuch] / man / man1 / notmuch-count.1
1 .TH NOTMUCH-COUNT 1 2013-02-17 "Notmuch 0.15.2"
2 .SH NAME
3 notmuch-count \- count messages matching the given search terms
4 .SH SYNOPSIS
5
6 .B notmuch count
7 .RI  [ options "... ] <" search-term ">..."
8
9 .SH DESCRIPTION
10
11 Count messages matching the search terms.
12
13 The number of matching messages (or threads) is output to stdout.
14
15 With no search terms, a count of all messages (or threads) in the database will
16 be displayed.
17
18 See \fBnotmuch-search-terms\fR(7)
19 for details of the supported syntax for <search-terms>.
20
21 Supported options for
22 .B count
23 include
24 .RS 4
25 .TP 4
26 .B \-\-output=(messages|threads)
27
28 .RS 4
29 .TP 4
30 .B messages
31
32 Output the number of matching messages. This is the default.
33 .RE
34 .RS 4
35 .TP 4
36 .B threads
37
38 Output the number of matching threads.
39 .RE
40 .RE
41
42 .RS 4
43 .TP 4
44 .BR \-\-exclude=(true|false)
45
46 Specify whether to omit messages matching search.tag_exclude from the
47 count (the default) or not.
48 .RE
49
50 .RS 4
51 .TP 4
52 .BR \-\-batch
53
54 Read queries from a file (stdin by default), one per line, and output
55 the number of matching messages (or threads) to stdout, one per
56 line. On an empty input line the count of all messages (or threads) in
57 the database will be output. This option is not compatible with
58 specifying search terms on the command line.
59 .RE
60
61 .RS 4
62 .TP 4
63 .BR "\-\-input=" <filename>
64
65 Read input from given file, instead of from stdin. Implies
66 .BR --batch .
67 .RE
68
69 .RE
70 .RE
71
72 .SH SEE ALSO
73
74 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-dump\fR(1),
75 \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1), \fBnotmuch-reply\fR(1),
76 \fBnotmuch-restore\fR(1), \fBnotmuch-search\fR(1),
77 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
78 \fBnotmuch-tag\fR(1)