Standard Files
Slandard output
Utility
Standard error
Standard input
Terminal
Figure 5.2: Standard Input, Output, and Error Files
computer system consistsof mainly three parts, input, processing, and output devices, The
A
displays or prints information or
input device accepts data from a user, and the output device
device processes the user input
any eror messages that are generated. The processing
keyboard and
according to the specified instructions to generate the desired output. The
examples of output
mouse are examples of input devices, and the screen and the printer are
devices. The CPUis the processing device.
In the Linux operating system, all input and output devices are considered special files.
Standard Input File
In Linux, when you execute a commandthat requires input, the shell interprets the command
and ass1gns the keyboard as the default source of input. The keyboard is referred to as the
standard input file.
Lel usconsider the exanmple of the cat command. When you specify the cat command with
a ne name, all the lines in the file are displayed. However, without a file name, the cat
Command takes input from the standard input file or the keyboard, as shown below:
$ cat <Enter)
The cat command waits
for input from the keyboard. When you type characters and press
the <Enter> key, the characters are displayed on the screen, as shown below:
Slandard output
Utility
Standard error
Standard input
Terminal
Figure 5.2: Standard Input, Output, and Error Files
computer system consistsof mainly three parts, input, processing, and output devices, The
A
displays or prints information or
input device accepts data from a user, and the output device
device processes the user input
any eror messages that are generated. The processing
keyboard and
according to the specified instructions to generate the desired output. The
examples of output
mouse are examples of input devices, and the screen and the printer are
devices. The CPUis the processing device.
In the Linux operating system, all input and output devices are considered special files.
Standard Input File
In Linux, when you execute a commandthat requires input, the shell interprets the command
and ass1gns the keyboard as the default source of input. The keyboard is referred to as the
standard input file.
Lel usconsider the exanmple of the cat command. When you specify the cat command with
a ne name, all the lines in the file are displayed. However, without a file name, the cat
Command takes input from the standard input file or the keyboard, as shown below:
$ cat <Enter)
The cat command waits
for input from the keyboard. When you type characters and press
the <Enter> key, the characters are displayed on the screen, as shown below: