Linux
Command Output의 파일 저장
mingoon.com
2020. 6. 12. 11:12
반응형
Command Line에서 명령 실행할 때 Output을 파일로 저장하는 방법은 다음과 같다.
| Syntax | 터미널 | 파일 | 파일이 존재하는 경우 | ||
| StdOut | StdErr | StdOut | StdErr | ||
| > | no | yes | yes | no | overwrite |
| >> | no | yes | yes | no | append |
| 2> | yes | no | no | yes | overwrite |
| 2>> | yes | no | no | yes | append |
| &> | no | no | yes | yes | overwrite |
| &>> | no | no | yes | yes | append |
| | tee | yes | yes | yes | no | overwrite |
| | tee -a | yes | yes | yes | no | append |
| n.e. (*) | yes | yes | no | yes | overwrite |
| n.e. (*) | yes | yes | no | yes | append |
| |& tee | yes | yes | yes | yes | overwrite |
| |& tee -a | yes | yes | yes | yes | append |
출처 : https://askubuntu.com/questions/420981/how-do-i-save-terminal-output-to-a-file