title: Crontab to create a new file
body: <p>I'm trying to create a simple crontab that creates a file called log.txt every minute by populating it with a simple command's output. Right now this is what I've put into my crontab:</p>
  
  <pre><code>* * * * * (/usr/bin/ls &lt;pathToRandomDirectory) &gt; log.txt
  </code></pre>
  
  <p>By my understanding, the 5 asterisks correspond to "every minute". But when I run this the log.txt file is not being created. Is there something I'm missing here? </p>
  
  <p>ALSO, if I didn't want to have an email sent to me whenever the job is created I found that I need to put the line:</p>
  
  <pre><code>&gt;/dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>Somewhere in my crontab file. Where exactly does this go? At the end of the command or on a separate line?</p>