Raspberry Pi_Kor_10.8.2 redirection 명령 – 입력, 출력 장치 변경

10.8.2 redirection 명령 – 입력, 출력 장치 변경

Linux에서는 특정 명령을 실행할 때 그 실행 결과를 사전에 지정된 출력장치로 보낸다. 그런데 필요에 따라 실행결과를 사전에 지정된 출력장치가 아닌 다른 출력장치로 보낼 수 있다.

이럴 때 사용하는 것이 “” (redirection)이다. 이 명령을 사용하면 이 명령 뒤에 지정된 출력장치로 실행결과를 보내준다. “redirect”의 의미는 키보드와 모니터가 설정되어 있는 기본 입력과 기본출력을 다른 곳으로 변경하는 것이다.

Raspberry Pi_Eng_10.8.2 Redirection Command – Change Input and Output Device

10.8.2 Redirection Command – Change Input and Output Device

In Linux, when you run a particular command, it sends its execution results to a predefined output device. However, if necessary, the execution result can be sent to an output device other than the predefined output device.

It is “” (redirection) that is used in this case. If you use this command, it sends the execution result to the output device specified after this command. “redirect” means to change the default input device and the default output device where are set as the keyboard and monitor to another device.

Note that there are several commands as follows for user to redirect input and output with:

■ < and < and >> — Sends the processing result of the left to the right.

■ — Overwrite existing file if one exists

■ <> — Append existing file if one exists