Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
linux input output questions?
Linux input output questions?
Use the following transcript to answer the next 3 questions.
[prince@station prince]$ cal > cal.out
[prince@station prince]$ ls -l /dev/stdin
lrwxrwxrwx 1 root root 17 Apr 1 11:13 /dev/stdin -> ../proc/self/fd/0
[prince@station prince]$ cat /dev/stdin < cal.out
September 2003
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
8. Which of the following would best describe the file /proc/self?
A. The file is a symbolic link which resolves to the current login shell.
B. The file is a symbolic link which resolves to the root directory.
C. The file is a symbolic link which resolves to /dev/stdout.
D. The file is a symbolic link which resolves to /tmp.
E. The file is a symbolic link which resolves to the /proc/pid directory corresponding to the current process.
9. For the cat process, to what file would the symbolic link /proc/self/fd/0 resolve?
A. /dev/stdin
B. cal.out
C. /dev/tty1
D. /tmp
E. /proc/self
10. For the cat process, to what file would the symbolic link /proc/self/fd/1 most likely resolve?
A. /proc/self
B. /tmp
C. cal.out
D. /dev/stdin
E. /dev/tty1
1 Answer
- ?Lv 71 decade agoFavorite Answer
8. E
On my system,
$ ls -ld /proc/self
lrwxrwxrwx 1 root root 64 2010-12-12 04:21 /proc/self -> 14503
i.e. a link to /proc/14503
9. B
10. E. On mine, maybe /dev/pts/8
Source(s): man proc /proc/[number]/fd This is a subdirectory containing one entry for each file which the process has open, named by its file descriptor, and which is a symbolic link to the actual file. Thus, 0 is standard input, 1 standard output, 2 standard error, etc.