title: How to schedule tcpdump to run for a specific period of time?
body: <p>Each time, when I manually run <code>tcpdump</code>, I have to use <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop it. Now I want to schedule my <code>tcpdump</code> with cronjob and I only need it to run for 1 and half hours. Without manually running <kbd>Ctrl</kbd>+<kbd>C</kbd> or kill command, how can it be stopped automatically? Here is the command I am testing:</p>
  
  <pre><code>tcpdump -i eth0 'port 8080' -w  myfile
  </code></pre>
  
  <p>I can schedule another cronjob  to kill the <code>tcpdump</code> process, but it seems not a good idea. </p>