the 'tee' command
tee - Used in the middle of a pipeline, this command allows you to both redirect output to a file, and pass it to further commands in the pipeline.
Examples:
- ps -ax | tee processes.txt | more
- Use the ps command to get a list of processes running on the system, store it in the file processes.txt, and also pass it to more to display it one screen at a time. Note that you could get the same result with the two commands:
ps -ax >processes.txt
more processes.txt
0 Comments:
Post a Comment
<< Home