I/O redirection
View worked solution
Answer: B
I/O redirection is a mechanism in operating systems (such as Unix/Linux shells) that redirects the standard input, standard output, or standard error streams of a program to or from files or devices, instead of the default terminal.
- Option A is incorrect: Changing the name of a file is a file management operation (like
mvorrename), which is unrelated to I/O redirection. - Option B is correct: Input redirection (typically represented by the
<operator) allows an existing file to be used as the standard input for a program. For example,command < input.txtfeeds the contents ofinput.txtinto the program as standard input. - Option C is incorrect: Connecting the output of one program to the input of another is specifically called piping (using the
|operator). While related to stream redirection, it specifically connects processes rather than redirecting I/O to/from files.
Free practice · Your answers on this page are not saved.
