How redirect standard output to a file in Linux?

Pham Quỳnh

New member
How redirect standard output to a file in Linux?
Answer
List:
  1. command > output.txt. The standard output stream will be redirected to the file only, it will not be visible in the terminal. …
  2. command >> output.txt. …
  3. command 2> output.txt. …
  4. command 2>> output.txt. …
  5. command &> output.txt. …
  6. command &>> output.txt. …
  7. command | tee output.txt. …
  8. command | tee -a output.txt.
 

Tìm kiếm

Back
Top