Quantcast
Channel: What are file descriptors, explained in simple terms? - Stack Overflow
Browsing latest articles
Browse All 15 View Live

Answer by sumitsinghdeode for What are file descriptors, explained in simple...

Addition to above all simplified responses. If you are working with files in bash script, it's better to use file descriptor. For example:- You want to read and write from/to the file "test.txt". Use...

View Article



Answer by Mahendra suthar for What are file descriptors, explained in simple...

File descriptors To Kernel all open files are referred to by file descriptors. A file descriptor is a non - negative integer. When we open an existing or create a new file, the kernel returns a file...

View Article

Image may be NSFW.
Clik here to view.

Answer by prosti for What are file descriptors, explained in simple terms?

Other answers added great stuff. I will add just my 2 cents. According to Wikipedia we know for sure: a file descriptor is a non-negative integer. The most important thing I think is missing, would be...

View Article

Answer by Abhishek Kamal for What are file descriptors, explained in simple...

File Descriptors (FD) : In Linux/Unix, everything is a file. Regular file, Directories, and even Devices are files. Every File has an associated number called File Descriptor (FD). Your screen also has...

View Article

Answer by Sandeep_black for What are file descriptors, explained in simple...

More points regarding File Descriptor: File Descriptors (FD) are non-negative integers (0, 1, 2, ...) that are associated with files that are opened. 0, 1, 2 are standard FD's that corresponds to...

View Article


Answer by JohnDoea for What are file descriptors, explained in simple terms?

Any operating system has processes (p's) running, say p1, p2, p3 and so forth. Each process usually makes an ongoing usage of files. Each process is consisted of a process tree (or a process table, in...

View Article

Answer by Balu for What are file descriptors, explained in simple terms?

As an addition to other answers, unix considers everything as a file system. Your keyboard is a file that is read only from the perspective of the kernel. The screen is a write only file. Similarly,...

View Article

Image may be NSFW.
Clik here to view.

Answer by Shekhar Kumar for What are file descriptors, explained in simple...

Hear it from the Horse's Mouth : APUE (Richard Stevens). To the kernel, all open files are referred to by File Descriptors. A file descriptor is a non-negative number. When we open an existing file or...

View Article


Answer by Beano for What are file descriptors, explained in simple terms?

A file descriptor is an opaque handle that is used in the interface between user and kernel space to identify file/socket resources. Therefore, when you use open() or socket() (system calls to...

View Article


Answer by Tayyab for What are file descriptors, explained in simple terms?

In simple words, when you open a file, the operating system creates an entry to represent that file and store the information about that opened file. So if there are 100 files opened in your OS then...

View Article

What are file descriptors, explained in simple terms?

What would be a more simplified description of file descriptors compared to Wikipedia's? Why are they required? Say, take shell processes as an example and how does it apply for it? Does a process...

View Article

Answer by swayamraina for What are file descriptors, explained in simple terms?

File descriptors are nothing but references for any open resource. As soon as you open a resource the kernel assumes you will be doing some operations on it. All the communication via your program and...

View Article

Answer by Sidney for What are file descriptors, explained in simple terms?

I'm don't know the kernel code, but I'll add my two cents here since I've been thinking about this for some time, and I think it'll be useful.When you open a file, the kernel returns a file descriptor...

View Article


Image may be NSFW.
Clik here to view.

Answer by Harsh Tripathi for What are file descriptors, explained in simple...

All answer that are provided is great here is mine version --File Descriptors are non-negative integers that act as an abstract handle to “Files” or I/O resources (like pipes, sockets, or data...

View Article
Browsing latest articles
Browse All 15 View Live




Latest Images