0

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

grep
ls
tree
etc

1 Answers1

1

Use tee(1).

command | tee file1 file2 file3 ...
Peschke
  • 4,028
  • 2
  • 16
  • 30