title: Error using timeout command - invalid time interval
body: <p>I want to kill a command after waiting for result for 2 seconds. If the command didn't come up with a result (took too long), the command should stop. I have gone through the documents and tested the following command:</p>
  
  <pre><code>timeout --kill-after=2 ls /mnt/ftp/;
  echo $?;
  </code></pre>
  
  <p>Or </p>
  
  <pre><code>timeout -k 2 ls /mnt/ftp/;
  echo $?;
  </code></pre>
  
  <p>However, I am getting this error:</p>
  
  <pre><code>timeout: invalid time interval ‘ls’
  </code></pre>
  
  <p>Note: The command below stops after timeout period by doesn't kill the process:</p>
  
  <pre><code>timeout 2 ls /mnt/ftp/;
  </code></pre>