title: How can I execute external commands in C++/Linux?
body: <p>I just want to know which is the best way to execute an external command in C++ and how can I grab the output if there is any?</p>
  
  <p><strong>Edit</strong>: I Guess I had to tell that I'm a newbie here in this world, so I think I'm gonna need a working example. For example I want to execute a command like: </p>
  
  <pre><code>ls -la
  </code></pre>
  
  <p>how do I do that?</p>