Redirect all command output, stdin/stderr, to a file on Linux

puppet agent --test --noop >/var/tmp/puppet_noop_20130315 2>&1

Notes:
  1. The 2>&1 redirects stderr to where stdin points
    1. stdin points to the console by default unless you change that
    2. here stdin is redirected to a file under /var/tmp


Comments

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny