This question already has an answer here:

Is there a way that I can get a resulted output to multiple locations at the same time. ls -RsgorCh >> /Users/User1/Text1.txt will print the output as a text file in the given location. I want to know whether I can get the output to be printed into multiple different locations at the same time. Possible multiple locations can be

  1. Terminal + Folder + Folder etc..
  2. Folder + Folder + Folder etc..

Also the commands can be


marked as duplicate by msp9011, muru, terdon bash Jul 3 at 12:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Use tee(1).

command | tee file1 file2 file3 ...

Not the answer you're looking for? Browse other questions tagged or ask your own question.