Loadable kernel modules provide a mechanism to dynamically modify the functionality of a running system, by allowing code to be loaded and unloaded from the kernel. Loading code into the kernel via a ...
Last week’s column looked at how we can read from and write to files by associated the files with user-defined file descriptors. This week, we take this idea a bit further. Closing File Descriptors In ...
The lowly file descriptor is one of the fundamental objects in Linux systems. A file descriptor, which is a simple integer value, can refer to an open file — or to a network connection, a running ...
There is a standard C approach to files, but there is also a POSIX standard that is implemented in Linux/Unix and in many ways this is more general than the C file functions. The reason is that once ...
Have you ever wanted to read a file one line at a time in a shell script and found the task to be a lot more trouble than you ever imagined? If you use a “for line ...
The fcntl i.e. file descriptor control function provides a way of working with a file descriptor to find out the status of the file and to modify the way it is used. It is very similar to the ioctl ...