home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0005.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.2 KB  |  34 lines

  1. Submitted-by: seanf@sco.COM (Sean Fagan)
  2.  
  3. In article <14014@cs.utexas.edu> addw@phcomp.co.uk (Alain Williams) writes:
  4. >What happens if you do an ``ls -l'' on /dev/fd, do you see the fds which are
  5. >open to the ls program or all possible fds, even those which aren't opened ?
  6.  
  7. You get something that looks like
  8.  
  9. kithrup 10> ls -l /dev/fd
  10. total 0
  11. crw-rw-rw- 5 bin    bin    46,0    Jun 11 15:48 0
  12. crw-rw-rw- 5 bin    bin    46,1    Jun 11 15:48 1
  13. crw-rw-rw- 2 bin    bin    46,2    Jun 11 15:48 2
  14. crw-rw-rw- 1 bin    bin    46,3    Jun 11 15:48 3
  15. crw-rw-rw- 1 bin    bin    46,4    Jun 11 15:48 4
  16. crw-rw-rw- 1 bin    bin    46,5    Jun 11 15:48 5
  17.  
  18. And so on.  They are normal device drivers; stat'ing them doesn't do
  19. anything strange, just opening them.
  20.  
  21. (/dev/stdin.o, /dev/stdin.s, /dev/stdin.c, /dev/stdin, and /dev/fd/0 are all
  22. linked on my system; similarly with /dev/stdout.  /dev/stderr is linked to
  23. /dev/fd/0, and all the others [through 60 on my system] only have one link.)
  24.  
  25. -- 
  26. -----------------+
  27. Sean Eric Fagan  | "Quoth the raven,"
  28. seanf@sco.COM    | "Eat my shorts!"
  29. uunet!sco!seanf  |     -- Lisa and Bart Simpson
  30. (408) 458-1422   | Any opinions expressed are my own, not my employers'.
  31.  
  32. Volume-Number: Volume 22, Number 6
  33.  
  34.