Questions tagged [open-files]

Dealing with files that are currently opened in a program

Use this tag for questions about open file descriptors: listing them, reacting to events, etc.

For questions about selecting which program will be used when opening a file, see .

Useful tools

  • fuser: list the processes that have a given file open
  • lsof: list open files of processes
  • /proc: on many Unix variants, contains a directory for each process
139 questions
6
votes
1 answer

file descriptors and /dev/fd

Are file descriptors unique across a process, or throughout the whole system. Because every file seems the use the same descriptor for stdin and stdout. Is there something special with these? How does stdin and stdout work? I realize the dev/fd,…
rubixibuc
  • 1,747
4
votes
1 answer

If file does not get closed, will OS close it?

If a file is being opened by a process and it is not being closed by any of the processes, will the OS automatically close that open file?