1.

Which file is used for indicating terminals?(a) /dev/tty(b) /dev/null(c) terminal file(d) device fileI got this question in homework.My doubt stems from Redirection and Pipes topic in division The Shell of Unix

Answer»

Right answer is (a) /dev/tty

For explanation I WOULD say: /dev/tty is another special file which is used for REPRESENTING ONE’s terminal. Consider user1 is working on terminal /dev/pts/1 and USER 2 is working on /dev/pts/2. Then, both the users can refer to their own TERMINALS with the same filename. For example, if user 1 issues the command



Discussion

No Comment Found

Related InterviewSolutions