title: Running tcpdump in the background linux
body: <p>Linux (Gentoo) and Linux (Redhat on AWS free)</p>
  
  <p>I am a member of the pcap group and can run tcpdump as a non-root user.</p>
  
  <p>I am trying to run a script the runs tcpdump in the background and send the output to a text file temp.txt. My script will create a file called temp.txt but <code>/usr/bin/tcpdump  -tttt</code> will not write to it.</p>
  
  <p>I can run the script without nohup.</p>
  
  <pre><code>/usr/sbin/tcpdump -c 10 -tttt &gt; `pwd`/temp.txt
  </code></pre>
  
  <p>Why will the nohup not work? The following is my script:</p>
  
  <pre><code>#!/bin/bash
  #tpd-txt.sh
  nohup /usr/sbin/tcpdump -c 10 -tttt &gt; `pwd`/temp.txt &gt; /dev/null 2&gt;&amp;1 &amp;
  </code></pre>