Skip to main content
deleted 45 characters in body
Source Link
muru
  • 77.9k
  • 16
  • 212
  • 318

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and in /sys/ (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this).

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and in /sys/ (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and in /sys/ (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this).

added 4 characters in body
Source Link

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and in /sys/ (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and /sys (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and in /sys/ (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

deleted 2 characters in body
Source Link

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and /sys (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/self$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and /sys (read about sysfs).

These pseudo files (which appear as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/self/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

In addition of device nodes explained in other answers (created with mknod(2) or supplied by some devfs), notably the one from Sepahrad Salour, Linux has other "magical" files provided by special virtual file systems, in particular in /proc/ (see proc(5), read about procfs) and /sys (read about sysfs).

These pseudo files (which appear -e.g. to stat(2)- as ordinary files, not as devices) are a virtual view provided by the kernel; in particular, reading from /proc/ (e.g. with cat /proc/$$/maps, or by open(2)-ing /proc/self/status in your program) generally does not involve any physical I/O from disk or network, so is quite fast.

To create some additional pseudo-file in /proc/ you generally should write your own kernel module and load it (see e.g. this)

added 71 characters in body
Source Link
Loading
added 182 characters in body
Source Link
Loading
Source Link
Loading