Custom Search

Friday, September 18, 2015

How to Linux show command output on terminal and save to a file at the same time

Howto Linux print on terminal and write to a file simultaneously

$tail -f /var/log/upstart/ironic-api.log 2>&1 | tee a.txt

Run command in watch mode and append output to a file and print in terminal

$watch " 2>&1 | tee -a mylog.txt"

No comments:

Post a Comment