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
| Docker Container 메모리 사용량 조회 (588) | 2021.02.25 |
|---|---|
| Ubuntu에서 httrack으로 웹사이트 다운로드하기 (0) | 2020.08.12 |
| CentOS 8에서 docker-compose의 같은 스택에서 컨테이너 접속 불가 (114) | 2020.06.04 |
댓글 영역