title: How to see the console history of all commands in my Linux server?
body: <p>I am searching for a way to see the history of what echoed in the server.
  I am using GitHub webhooks and when an auto-deployment occurs a script with echo is executed. This is the code for example:</p>
  
  <pre><code>&lt;?php
  try
  {
    $payload = json_decode($_REQUEST['payload']);
      echo 'payload is received; ';
  }
  catch(Exception $e)
  {
      echo 'no payload; ';
    exit(0);
  }
  
  if ($payload-&gt;ref === 'refs/heads/development')
  {   echo 'received updated in dev branch; bash/deploy_frontend2dev.sh ';
      exec('sh /var/www/html/bash/deploy_frontend2dev.sh', $output);
      var_dump($output);
  }
  else 
  echo 'smth is called';
  </code></pre>
  
  <p>I know you can see the history of commands with <code>$ history</code> but when I do that it doesn't show the text that has been echoed, only the commands that have run. Is there anyway to see it? Also if you notice in the code there is a <code>var_dump</code> which is also printed to the screen.</p>
  
  <p>By the way, the exec that happens in the PHP script does that:</p>
  
  <pre><code>cd /var/www/html/ezmob-frontend/;
  
  git pull origin development;
  echo "pulling file from dev branch";
  
  rm -R ../dashboard;
  echo "dashboard is updated";
  
  unzip ezmob-frontend-built.zip -d ../;
  
  chmod 777 -R dashboard;
  </code></pre>
  
  <p>This should also echo some text, but yet nothing is shown.</p>