File Details Flashcards
The term file refers to…?
Regular files, directories, symbolic links, device nodes, anothers.
All files have common attributes….?
User owner, group owner, permissions, and timing information. This information is stored in a structure called an inode.
File names are contained in data structures called…?
dentries (directory entries).
A file’s inode information can be examined with the…?
ls -l and stat commands.
Within the Linux kernel, files are generally identified by…?
inode number. The ls -i command can be used to examine inode numbers.
Three Components Linux associates with a file.
- Data
The data is the content of the file, in this case, the 16 bytes that compose elvis’s shopping list (13 visible characters, and 3 invisible “return characters that indicate the end of a line). In Linux, as in Unix, every file’s content is stored as a series of bytes. - Metadata
In addition to its content, every file in Linux has extra information associated with it. The entire last Workbook focused on some of this information, namely the file’s user owner, group owner, and permissions. Other information, such as the last time the file was modified or read, is stored as well. Much of this metadata is reported when you run the ls -l command. In Linux (and Unix), all of the extra information associated with a file (with the important exception discussed next) is stored in a structure called an inode.
-filename
The filename is the exception to the rule. Although the filename could be considered metadata associated with the file, it is not stored in the inode directly. Instead, the filename is stored in a structure called a dentry. (The term dentry is a shortening of directory entry, and, as we will see in a later Lesson, the structure is closely associated with directories.) In essence, the filename associates a name with an inode.
There are ______ structures associated with every file.
Three.
Dentry…?
contains a filename and refers to an inode, which contains the file’s metadata and refers to the file’s data.
See figure 1.1 for File Structures.
https://academy.redhat.com/courses/rha030-6.1/rha030_fsmngt_filedetail.html#rha030_fsmngt_filedetail_discussion
What’s in an inode…?
Stores all the file’s information, except for the filename.
What can be found in an inode…?
- Filetype
- Ownerships and Permissions
- Timing Information
- File length and size
- Link Count
Inode:
File Type…?
term file has a very general meaning: anything that exists in the filesystem (and thus has an inode associated with it) is a file. This includes regular files and directories, which we have already encountered, symbolic links and device nodes, and a couple more obscure creatures which are related to interprocess communication, and beyond the scope of the course.
Possible Linx/Unix File Types:
Regular file’s ls Abbreviation and Use…?
-
Storing data.
Possible Linx/Unix File Types:
Directories ls Abbreviation and Use…?
d
Organizing files
Possible Linx/Unix File Types:
Symbolic Links ls Abbreviation and Use…?
l
Referring to other files
Possible Linx/Unix File Types:
Character Device Nodes ls Abbreviation and Use…?
c
Accessing Devices.
Possible Linx/Unix File Types:
Block Device Nodes ls Abbreviation and Use…?
b
Accessing devices
Possible Linx/Unix File Types:
Named Pipes ls Abbreviation and Use…?
p
Interprocess communication.
Possible Linx/Unix File Types:
Sockets ls Abbreviation and Use…?
s
Interprocess Communication.