 <p>In the general case, you can redirect <code>stdout</code> to a file with the <code>&gt;</code> character:</p> <pre><code>your_program_name whatever arguments here &gt; target.file ^^^^^^^^^^^^^ </code></pre>