Chapter 3 - Essential File Management Tools Flashcards
(40 cards)
What defines the layout of the linux file system?
Filesystem Hierarchy Standard
what does “/boot” contain?
Contains all files and directories that are needed to boot the Linux kernel.
what does “/dev” contain?
Contains device files that are used for accessing physical devices. This directory is essential during boot.
what does “/etc” contain?
Contains configuration files that are used by programs and services on your server. This directory is essential during boot.
what does “/home” contain?
Used for local user home directories.
what does “/mnt”, “/media” contain?
Contain directories that are used for mounting devices in the file system tree.
what does “/opt” contain?
Used for optional packages that may be installed on your server
what does “/proc” contain?
Used by the proc file system. This is a file system structure that gives access to kernel information.
what does “/root” contain?
The home directory of the root user
what does “/run” contain?
Contains process and user-specific information that has been created since the last boot.
what does “/srv” contain?
May be used for data by services like NFS, FTP, and HTTP.
what does “/sys” contain?
Used as an interface to different hardware devices that is managed by the Linux kernel and associated processes.
what does “/tmp” contain?
Contains temporary files that may be deleted without any warning during boot.
what does “/usr” contain?
Contains subdirectories with program files, libraries for these program files, and documentation about them.
what does “/var” contain?
Contains files that may change in size dynamically, such as log files, mail boxes, and spool files.
What are some common directories that are mounted on separate dedicated devices?
/var
/home
/usr
/boot
Which command gives the output of all mounted devices?
“mount” command. To get this information, the “/proc/mounts” file is read, where the kernel keeps information about all current mounts. It shows kernel interfaces also, which may lead to a long list of mounted devices being displayed
Command to show available disk space on mounted
devices?
df -Th
Which command shows mounts and the relationship that exists between the different mounts?
findmnt
What is absolute pathname?
An absolute filename, or absolute pathname, is a complete path reference to the file or directory you want to work with. This pathname starts with the root directory, followed by all subdirectories up to the actual filename. No matter what your current directory is, absolute filenames will always work. An example of an absolute filename is “/home/lisa/file1”
What is a relative pathname?
A relative filename is relative to the current directory as shown with the pwd command. It contains only the elements that are required to get from the current
directory up to the item you need. Suppose that your current directory is “/home” (as shown by the pwd command). When you refer to the relative filename “lisa/file1”, you are referring to the absolute filename “/home/lisa/file1”
Where does linux store administrative data about files?
inodes. The inode is used to store all
administrative data about files. Every file on Linux has an inode, and in the inode,
important information about the file is stored:
- The data block where the file contents are stored
- The creation, access, and modification date
- Permissions
- File owners
Which is the one important information that is not stored in the inode?
name of the file. inode does not know which name it has; it just knows how many names are associated with
the inode
What is a hard link?
inode does not know which name it has; it just knows how many names are associated with the inode. These names are referred to as hard links. When you create a file, you give it a name. Basically, this name is a hard link