Which of the following files are known as special files in UNIX?

Which of the following files are known as special files in UNIX?
A. sample.txt
B. /dev/null
C. /dev/tty
D. /dev/null and /dev/tty
 
Answer: d
Explanation: There are two special files named /dev/null and /dev/tty which is used in UNIX for special purposes. For example, if we want to check whether the program runs successfully without seeing its output on the screen or may not want to save output in a file either. For this purpose, a special file /dev/null is used. It accepts any stream without growing in size. The second file /dev/tty is the one used for indicating one’s terminal.
 

Tìm kiếm

Back
Top