Chapter 7 Flashcards

1
Q

Blank are files that control how the computer operates

A

System files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the 7 types of system files

A

1) System startup scripts that launch servers and other important daemons
2) Program files - both binary files and scripts
3) Program support files - such as icons and fonts
4) Configuration files that define how the system works
5) Configuration files for most services and other daemons
6) Data storage for system programs
7) System log files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Blank, such as user data files and program binary files, may be reasonably shared between computers

A

Shareable files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Blank files contain system specific information, such as configuration files.

A

Unshareable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What system provides some standardization in the layout of directories across multiple user accounts

A

Filesystem Hierarchy Standard (FHS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Blank files don’t normally change unless through direct intervention by a system administrator

A

Static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Users, automated scripts, and servers are examples of blank files.

A

Variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Static or Variable? /usr

A

Static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Static or Variable? /home

A

Variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Static or Variable? /etc

A

static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Static or Variable? /root

A

static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Static or Variable? /var/mail

A

variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Static or Variable? /var/run

A

variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Static or Variable? /etc

A

static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Static or Variable? /var/lock

A

variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The root directory. All files appear in this directory or subdirectories of it

A

/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The directory that holds system configuration files

A

/etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The directory that holds important boot files, such as the Linux kernel

A

/boot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The directory that holds program files that are critical for normal operation and users may run

A

/bin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The directory that holds program files that are critical for normal operation and users may seldom run

A

/sbin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The directory that holds libraries

A

/lib

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The directory that holds programs and data used in normal system operation but that are critical for a bare bones boot of the system

A

/usr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

The directory that holds users’ home directory

A

/home

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

The directory that is the root’s users’ home directory

A

/root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The directory that holds miscellaneous transient files, such as log files and print spool files
/var
26
The directory that holds temporary files, often including temporary files created by user programs
/tmp
27
The directory that is the traditional mount point for removable media; typically split into subdirectories for each mounted filesystem
/mnt
28
The directory that is the new mount point for removable media
/media
29
The directory that holds device files, which provide low-level access to hardware
/dev
30
The directory that has information about the running system
/run
31
The blank directory holds most system configuration files
/etc
32
Program files that exist in /sbin, /bin, /usr/sbin and /usr/bin are blank
executable directories
33
Blank are collections of programming functions that can be useful to many programs. They're stored in separate files to save disk space and RAM when programs run
Library directories
34
To manipulate files, it's helpful to know what they are. The blank command provides you with this information
ls
35
Give both the long form and short form ls option that will display dot(hidden) files
--all -a
36
Give the long form option of ls that produces a color coding listing that differentiates directories and other special files by displaying them in different colors
--color
37
Give both the long form and short form ls option that changes the behavior of ls to only list directory names
--directory -d
38
Give both the short form ls option that produces a long listing that includes information such as the file's permission string, owner, group, etc
-l
39
Give both the long form and short form ls option that appends an indicator code to the end of each name so that you know what type of file it is
--file-type -F
40
Give both the long form and short form ls option that causes ls to display directory contents recursively up the directory ladder(if you are in a subdirectory)
--recursive -r
41
The blank command changes the current directory in which you are working
cd
42
If you need to know the complete path of your current location, use what command
pwd
43
When pointing to files and directories in commands, you can refer to them in what three ways
Absolute references Home Directory references Relative references
44
Which reference type always begins with a /
Absolute reference
45
The blank character refers to the user's home directory and is used in home directory reference
tilde ~
46
Relative reference can mean typing file name that is in the directory you are working in or using the special hidden reference (blank)
..
47
In order to create files, you can use the blank command followed by the name of the file that you want to create
touch
48
What happens if you pass the name of an existing file with the touch command?
The file access and modification time stamps are updated
49
The blank or blank option with touch tells the system to not create a new file if one doesn't already exist
-c --no-create
50
You can use blank or blank to set the date of a touch file to a specified value
-d --date=string
51
If you're working in a text-mode shell, blank command copies a file
cp
52
What is the command to copy orig.txt to new.txt in the current directory?
cp orig.txt new.txt
53
What is the command to copy orig.txt to the otherdir directory?
cp orig.txt /otherdir
54
What is the command to copy orig.txt to the otherdir directory and rename the copy new.txt?
cp orig.txt /otherdir /new.txt
55
With the cp command, what option(s) forces the system to overwrite any existing files without prompting?
-f or --force
56
With the cp command, what option(s) causes cp to ask you before overwriting any existing files?
-i or --interactive
57
With the cp command, what option(s) copies the entire directory, including its subdirectories.
-R or --recursive
58
With the cp command, what option(s) is similar to recursive copy, but preserves ownership and copies links as is?
-a or --archive
59
With the cp command, what option(s) tells cp to copy the file only if the original is newer than the target or if the target doesn't exist.
-u or --update
60
In the text-mode shell, you use the blank command to move and rename a file.
mv
61
With the cp command, what option(s) preserves ownership and permissions, if possible?
-p or --preserve
62
What happens to the original file when you use the mv command?
It's deleted
63
What three options to the mv command don't work, but work for the cp command?
--preserve --archive --recursive
64
What command creates links to files?
ln
65
What is the syntax for using the ln command?
ln origname linkname
66
A blank is a file that refers to another file by name and using the link redirects to the original file
Symbolic (or soft) link
67
What is the syntax for creating a soft link?
ln -s origname linkname
68
The blank command deletes files in a text mode shell
rm
69
How can you delete an entire directory tree?
rm -r directory
70
What option for the rm command prompts you before deleting each file?
-i
71
What option for the rm command overrides the prompt before deleting default?
-f
72
A blank is a symbol that stands in for other characters and is sometimes called globbing
wildcard
73
When using wildcards, what symbol stands in for a single character?
? question mark
74
When using wildcards, what symbol stands in for any character or set of characters?
* asterisk
75
Characters enclosed in what symbol normally match any character within the set
square brackets []
76
Linux's native filesystems are blank, which means the filenames differ only in case are distinct files.
case-sensitive
77
You can use the blank command to create a directory
mkdir
78
When using the mkdir command, you can use the blank option(s) to specify the permissions according to the octal number that you pass
-m or --mode
79
When using the mkdir command, you can use the blank option(s) to create a necessary parent directory when one doesn't exist to create the passed directory and parent directory
-p or --parents
80
When using a text-mode shell, what command deletes directories?
rmdir
81
What must be true to use the rmdir command on a directory?
The directory has to be empty
82
What option can you use on the rmdir command to prevent the system from giving you an error message when you try to delete a non-empty directory?
--ignore-fail-on-non-empty
83
What option(s) can you use on the rmdir command to cause rmdir to delete an entire directory tree?
-p or --parents
84
What is the syntax for deleting a directory AND any subdirectory that it might contain?
rm -r directoryname
85
You can use what command to update a directory's timestamp, but you cannot use it to create a new directory
touch
86
You can use what command to copy a directory, however you must use what options to copy the directory and all its contents?
cp -r, -R, --recursive, -a, or --archive
87
What command can you use to move a directory?
mv
88
What command can you use to create links to directories?
ln
89
True or False: Linux does not support hard links to directories.
True
90
Which of the following commands would you use to rename newfile.txt to afile.txt? A. mv newfile.txt afile.txt B. cp newfile.txt afile.txt C. ln newfile.text afile.txt D. rn newfile.txt afile.txt E. touch newfile.txt afile.txt
A
91
You want to copy a directory, MyFiles, to a USB flash drive that uses the FAT filesystem. The contents of MyFiles are as follows: contract.odt outline.pdf outline.PDF The USB drive is mounted at /media/usb, and so you type cp -a MyFiles/media/usb. What problem will occur when you attempt to copy these files? A. The command will fail because it tries to create links. B. The MyFiles directory will be copied, but none of its files will be copied. C. One file will be missing on the USB flash drive. D. One file's name will be changed during the copy E. Everything will be fine. The copy will work correctly.
C
92
You type mkdir one/two/three and receive an error message that reads in part No Such File or directory. What can you do to overcome this problem? Select all that apply A. Add the --parents parameter to the mkdir command B. Issue three separate commands mkdir one, mkdir one/two and mkdir one/two/three C. Type touch mkdir to be sure the bin/mkdir file exists D. Type rmdir one to clear away the interfering base of the desired new directory tree E. Type rm -r one to clear away the entire interfering tree
A, B
93
True or False: You can create a symbolic link from one low-level filesystem to another
True
94
True or False: You can easily damage your Linux installation by typing the rm command when you log in to your regular account?
False
95
True or False: You can set a directory's timestamp with the touch command
True
96
You want to copy a file (origfile.txt) to the backups directory, but if a file called origfile.txt exists in the backup directory, you want to go ahead with the copy only if the file in the source location is newer than the one in the backups. The command to do this is cp blank origfile.txt /backups/.
-u
97
You've typed rmdir junk to delete the junk directory, but this command has failed because junk contains word processing files. A command that will work is blank.
rm -r junk
98
The blank wildcard matches any one symbol in a filename.
?
99
What directory primarily contains system configuration files?
/etc