Google News
logo
Unix - Quiz(MCQ)
Which of the following files are known as special files in Unix?
A)
/dev/tty
B)
/dev/null
C)
sample.txt
D)
/dev/null and /dev/tty

Correct Answer :   /dev/null and /dev/tty


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.

Advertisement