terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user@linux:~$
tee - 출력 분배
tee를 사용하여 출력을 화면과 파일에 동시에 보내는 방법을 배웁니다.
단계 1
tee를 사용하여 "hello"를 화면에 표시하면서 output.txt에 저장하세요.
입력: echo hello | tee output.txt
echo hello | tee output.txt
단계 2
cat으로 output.txt를 읽어 파일이 생성되었는지 확인하세요.
단계 3
tee -a (추가 모드)를 사용하여 "world"를 output.txt에 추가하세요.
단계 4
output.txt를 확인하여 두 줄 모두 있는지 검증하세요.