How to run unix / shell commands with wildcards using Java?
<p>I want to run some <code>unix/shell</code> commands in <code>Java</code> and process the output. I used <code>getRuntime.exec()</code>, but it is not giving correct output for some commands like <code>ls directory_path/*.tar.gz</code> . For that command my program is not giving any output but it is giving error saying <code>No such file or directory</code>. But the same command is giving correct output on command prompt. </p>

<p>Is there any other way to execute commands which include wildcards in  Java?</p>
