]> git.notmuchmail.org Git - notmuch-wiki/blob - manpages/notmuch-count-1.mdwn
73028d818b3fe928a54e28a18f5da68ec02338a1
[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 data‐
20        base 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           <b>--output=(messages|threads|files)</b>
27
28               <b>messages</b>
29                      Output  the  number  of  matching  messages.  This is the
30                      default.
31
32               <b>threads</b>
33                      Output the number of matching threads.
34
35               <b>files</b>  Output the number of files associated with matching  mes‐
36                      sages.  This  may  be  bigger than the number of matching
37                      messages due to duplicates (i.e.  multiple  files  having
38                      the same message-id).
39
40           <b>--exclude=(true|false)</b>
41                  Specify  whether to omit messages matching search.tag_exclude
42                  from the count (the default) or not.
43
44           <b>--batch</b>
45                  Read queries from a file (stdin by default),  one  per  line,
46                  and  output  the  number of matching messages (or threads) to
47                  stdout, one per line. On an empty input line the count of all
48                  messages  (or  threads)  in the database will be output. This
49                  option is not compatible with specifying search terms on  the
50                  command line.
51
52           <b>--lastmod</b>
53                  Append  lastmod  (counter for number of database updates) and
54                  UUID to  the  output.  lastmod  values  are  only  comparable
55                  between databases with the same UUID.
56
57           <b>--input=&lt;filename&gt;</b>
58                  Read  input  from  given file, instead of from stdin. Implies
59                  <b>--batch</b>.
60 </pre>
61
62 <h2>SEE ALSO</h2>
63 <pre>
64        <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>
65        <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),
66        <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>
67        <a href='../notmuch-tag-1/'>much-tag</a>(1)
68 </pre>
69
70 <h2>AUTHOR</h2>
71 <pre>
72        Carl Worth and many others
73 </pre>
74
75 <h2>COPYRIGHT</h2>
76 <pre>
77        2009-2016, Carl Worth and many others
78 </pre>
79
80 <h2>0.23</h2>