Linux Essentials Flashcards
What is the file descriptor number for STDIN?
the file descriptor number for STDIN is zero (0)
How is the file descriptor number for STDIN used in redirection?
< (same as 0<)
Redirects STDIN.
What is the file descriptor number for STOUT?
the file descriptor number for STOUT is one (1)
How is the file descriptor number for STOUT used in redirection?
> (same as 1>)
Redirects STDOUT. If redirection is to a file, the current contents of that file are overwritten.
—
> (same as 1»)
Redirects STDOUT in append mode. If output is written to a file, the output is appended to that file.
What is the file descriptor number for STERR?
the file descriptor number for STERR is two (2)
How is the file descriptor number for STERR used in redirection?
2>
Redirects STDERR.
2>&1
Redirects STDERR to the same destination as STDOUT.
Notice that this has to be used in combination with normal output redirection, as in ‘‘ls whuhiu > errout 2>&1.’’
In the Linux Filesystem Hierarchy Standard (FHS) what does / contain?
The / specifies the root directory. This is where the file system tree starts.
In the Linux Filesystem Hierarchy Standard (FHS) what does /boot contain?
/boot contains all files and directories that are needed to boot the Linux kernel.
In the Linux Filesystem Hierarchy Standard (FHS) what does /boot/EFI contain?
/boot/EFI contains all files and directories that are needed to boot the Linux kernel.
In the Linux Filesystem Hierarchy Standard (FHS) what does /dev contain?
/dev contains device files that are used for accessing physical devices. This directory is essential during boot.
In the Linux Filesystem Hierarchy Standard (FHS) what does /etc contain?
/etc contains configuration files that are used by programs and services on your server. This directory is essential during boot.
In the Linux Filesystem Hierarchy Standard (FHS) what does /home contain?
/home contains local user home directories.
In the Linux Filesystem Hierarchy Standard (FHS) what do /media and /mnt contain?
/media and /mnt contain directories that are used for mounting devices in the file system tree.
In the Linux Filesystem Hierarchy Standard (FHS) what does /opt contain?
/opt contains optional packages that may be installed on your server.
In the Linux Filesystem Hierarchy Standard (FHS) what does /proc contain?
/proc is used by the proc file system. This is a file system structure that gives access to kernel information.
In the Linux Filesystem Hierarchy Standard (FHS) what does /root contain?
/root is the home directory of the root user.
In the Linux Filesystem Hierarchy Standard (FHS) what does /run contain?
/run contains process and user-specific information that has been created since the last boot.
In the Linux Filesystem Hierarchy Standard (FHS) what does /srv contain?
/srv may be used for data by services like NFS, FTP, and HTTP.
In the Linux Filesystem Hierarchy Standard (FHS) what is /sys used for?
/sys is used as an interface to different hardware devices that are managed by the Linux kernel and associated processes.
In the Linux Filesystem Hierarchy Standard (FHS) what does / represent?
The / specifies the root directory. This is where the file system tree starts.
In the Linux Filesystem Hierarchy Standard (FHS) what does /usr contain?
/usr contains subdirectories with program files, libraries for these program files, and documentation about them.
In the Linux Filesystem Hierarchy Standard (FHS) what does /var contain?
/var contains files that may change in size dynamically, such as log files, mail boxes, and spool files.
Regular Expressions
What does the regex ^text do?
The regex ^text matches line that starts with specified text.
Regular Expressions
What does the regex text$ do?
The regex text$ matches line that ends with specified text.
Regular Expressions
What does the regex . do?
The regex . matches any single character (wildcard).
Regular Expressions
What does the regex [abc] do?
The regex [abc] matches a, b, or c.