]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-count-1.mdwn
ac92207d0dafe9b1e7f67912f4d5f3beae65b28c
[notmuch-wiki] / manpages / notmuch-count-1.mdwn
1 <h1>NOTMUCH-COUNT(1)</h1>
2
3 <h2>NAME</h2>
4 <pre>
5        notmuch-count - count messages matching the given search terms
6 </pre>
7
8 <h2>SYNOPSIS</h2>
9 <pre>
10        <b>notmuch</b> <b>count</b> [<u>option</u> ...] &lt;<u>search-term</u>&gt; ...
11 </pre>
12
13 <h2>DESCRIPTION</h2>
14 <pre>
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 <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7) for details of  the  supported  syntax  for
23        &lt;search-terms&gt;.
24
25        Supported options for <b>count</b> include
26
27            --output=(messages|threads|files)
28
29               <b>messages</b>
30
31                      Output  the  number  of  matching  messages.  This is the
32                      default.
33
34               <b>threads</b>
35
36                      Output the number of matching threads.
37
38               <b>files</b>
39
40                      Output the number of files associated with matching  mes-
41                      sages.  This  may  be  bigger than the number of matching
42                      messages due to duplicates (i.e.  multiple  files  having
43                      the same message-id).
44
45            <b>--exclude=(true|false)</b>
46
47                   Specify whether to omit messages matching search.tag_exclude
48                   from the count (the default) or not.
49
50            <b>--batch</b>
51
52                   Read queries from a file (stdin by default), one  per  line,
53                   and  output  the number of matching messages (or threads) to
54                   stdout, one per line. On an empty input line  the  count  of
55                   all  messages  (or  threads) in the database will be output.
56                   This option is not compatible with specifying  search  terms
57                   on the command line.
58
59            <b>--input=&lt;filename&gt;</b>
60
61                   Read  input  from given file, instead of from stdin. Implies
62                   --batch.
63 </pre>
64
65 <h2>SEE ALSO</h2>
66 <pre>
67        <a href='../notmuch-1/'>notmuch</a>(1), <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>notmuch-hooks</a>(5),  <a href='../notmuch-insert-1/'>not-</a>
68        <a href='../notmuch-insert-1/'>much-insert</a>(1),  <a href='../notmuch-new-1/'>notmuch-new</a>(1),  <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-restore-1/'>notmuch-restore</a>(1),
69        <a href='../notmuch-search-1/'>notmuch-search</a>(1),   <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7),   <a href='../notmuch-show-1/'>notmuch-show</a>(1),   <a href='../notmuch-tag-1/'>not-</a>
70        <a href='../notmuch-tag-1/'>much-tag</a>(1)
71 </pre>
72
73 <h2>AUTHOR</h2>
74 <pre>
75        Carl Worth and many others
76 </pre>
77
78 <h2>COPYRIGHT</h2>
79 <pre>
80        2014, Carl Worth and many others
81 </pre>
82
83 <h2>0.18</h2>