$ ps | tee ps.txt PID TTY TIME CMD 2901 pts/6 00:00:00 bash 3111 pts/6 00:00:00 ps 3112 pts/6 00:00:00 tee