Directories and Device Nodes Flashcards
The term file refers to…?
regular files, directories, symbolic links, device nodes, and others.
All files have common attributes..?
User owner, group owner, permissions, and timing information.
File meta-information is contained in…?
a data structure called inodes.
File names are contained in a data structure called…?
directory entries (dentries)
File meta-information can be examined with the…?
ls -l and stat commands.
Dentries…?
associate filenames with inodes.
Inodes which associate all of a file’s…?
attributes with its content.
every directory is referenced at least twice…?
once by itself (as the directory “.”), and once by its parent (with an actual directory name, such as report).
See Diagram 3.2 Dentry Tables for the report, report/html, and report/html/figures directories.
https://academy.redhat.com/courses/rha030-6.1/rha030_fsmngt_dirdev.html#rha030_fsmngt_dirdev_discussion
directories are simply collections of…?
dentries for the files the directory is said to contain, which map filenames to inodes.
Every directory contains at least…?
2 links, one from its own directory entry “.”, and one from its parent’s entry with the directory’s conventional name. Directories are referenced by additional link for every subdirectory, which refer to the directory as “..”.
Device nodes exist in the filesystem, but do not…?
contain data in the same way that regular files, or even directories and symbolic links, contain data. Instead the job of a device node is to act as a conduit to a particular device driver within the kernel.
When a user writes to a device node, the device node transfers the information to…?
the appropriate driver in the kernel.
When a user would like to collect information from a particular device, they read from…?
that device’s associated device node, just as reading from a file.
By convention, device nodes live within a dedicated directory called…?
/dev
(As there are over 7000 entries in the /dev directory, the output has been truncated to only the first several files. Focusing on the first character of each line, most of the files within /dev are not regular files or directories, but instead either character device nodes (“c”), or block device nodes (“b”). The two types of device nodes reflect the fact that device drivers in Linux fall into one of two major classes, character devices and block devices.)
Block devices are devices that …?
read and write information a chunk (“block”) at a time.