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
Q

The directory that holds miscellaneous transient files, such as log files and print spool files

A

/var

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

The directory that holds temporary files, often including temporary files created by user programs

A

/tmp

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

The directory that is the traditional mount point for removable media; typically split into subdirectories for each mounted filesystem

A

/mnt

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

The directory that is the new mount point for removable media

A

/media

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

The directory that holds device files, which provide low-level access to hardware

A

/dev

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

The directory that has information about the running system

A

/run

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

The blank directory holds most system configuration files

A

/etc

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

Program files that exist in /sbin, /bin, /usr/sbin and /usr/bin are blank

A

executable directories

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

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

A

Library directories

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

To manipulate files, it’s helpful to know what they are. The blank command provides you with this information

A

ls

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

Give both the long form and short form ls option that will display dot(hidden) files

A

–all -a

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

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

A

–color

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

Give both the long form and short form ls option that changes the behavior of ls to only list directory names

A

–directory -d

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

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

A

-l

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

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

A

–file-type -F

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

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)

A

–recursive -r

41
Q

The blank command changes the current directory in which you are working

A

cd

42
Q

If you need to know the complete path of your current location, use what command

A

pwd

43
Q

When pointing to files and directories in commands, you can refer to them in what three ways

A

Absolute references
Home Directory references
Relative references

44
Q

Which reference type always begins with a /

A

Absolute reference

45
Q

The blank character refers to the user’s home directory and is used in home directory reference

A

tilde ~

46
Q

Relative reference can mean typing file name that is in the directory you are working in or using the special hidden reference (blank)

A

..

47
Q

In order to create files, you can use the blank command followed by the name of the file that you want to create

A

touch

48
Q

What happens if you pass the name of an existing file with the touch command?

A

The file access and modification time stamps are updated

49
Q

The blank or blank option with touch tells the system to not create a new file if one doesn’t already exist

A

-c –no-create

50
Q

You can use blank or blank to set the date of a touch file to a specified value

A

-d –date=string

51
Q

If you’re working in a text-mode shell, blank command copies a file

A

cp

52
Q

What is the command to copy orig.txt to new.txt in the current directory?

A

cp orig.txt new.txt

53
Q

What is the command to copy orig.txt to the otherdir directory?

A

cp orig.txt /otherdir

54
Q

What is the command to copy orig.txt to the otherdir directory and rename the copy new.txt?

A

cp orig.txt /otherdir /new.txt

55
Q

With the cp command, what option(s) forces the system to overwrite any existing files without prompting?

A

-f or –force

56
Q

With the cp command, what option(s) causes cp to ask you before overwriting any existing files?

A

-i or –interactive

57
Q

With the cp command, what option(s) copies the entire directory, including its subdirectories.

A

-R or –recursive

58
Q

With the cp command, what option(s) is similar to recursive copy, but preserves ownership and copies links as is?

A

-a or –archive

59
Q

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.

A

-u or –update

60
Q

In the text-mode shell, you use the blank command to move and rename a file.

A

mv

61
Q

With the cp command, what option(s) preserves ownership and permissions, if possible?

A

-p or –preserve

62
Q

What happens to the original file when you use the mv command?

A

It’s deleted

63
Q

What three options to the mv command don’t work, but work for the cp command?

A

–preserve –archive –recursive

64
Q

What command creates links to files?

A

ln

65
Q

What is the syntax for using the ln command?

A

ln origname linkname

66
Q

A blank is a file that refers to another file by name and using the link redirects to the original file

A

Symbolic (or soft) link

67
Q

What is the syntax for creating a soft link?

A

ln -s origname linkname

68
Q

The blank command deletes files in a text mode shell

A

rm

69
Q

How can you delete an entire directory tree?

A

rm -r directory

70
Q

What option for the rm command prompts you before deleting each file?

A

-i

71
Q

What option for the rm command overrides the prompt before deleting default?

A

-f

72
Q

A blank is a symbol that stands in for other characters and is sometimes called globbing

A

wildcard

73
Q

When using wildcards, what symbol stands in for a single character?

A

? question mark

74
Q

When using wildcards, what symbol stands in for any character or set of characters?

A
  • asterisk
75
Q

Characters enclosed in what symbol normally match any character within the set

A

square brackets []

76
Q

Linux’s native filesystems are blank, which means the filenames differ only in case are distinct files.

A

case-sensitive

77
Q

You can use the blank command to create a directory

A

mkdir

78
Q

When using the mkdir command, you can use the blank option(s) to specify the permissions according to the octal number that you pass

A

-m or –mode

79
Q

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

A

-p or –parents

80
Q

When using a text-mode shell, what command deletes directories?

A

rmdir

81
Q

What must be true to use the rmdir command on a directory?

A

The directory has to be empty

82
Q

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?

A

–ignore-fail-on-non-empty

83
Q

What option(s) can you use on the rmdir command to cause rmdir to delete an entire directory tree?

A

-p or –parents

84
Q

What is the syntax for deleting a directory AND any subdirectory that it might contain?

A

rm -r directoryname

85
Q

You can use what command to update a directory’s timestamp, but you cannot use it to create a new directory

A

touch

86
Q

You can use what command to copy a directory, however you must use what options to copy the directory and all its contents?

A

cp
-r, -R, –recursive, -a, or –archive

87
Q

What command can you use to move a directory?

A

mv

88
Q

What command can you use to create links to directories?

A

ln

89
Q

True or False: Linux does not support hard links to directories.

A

True

90
Q

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

A

91
Q

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.

A

C

92
Q

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

A, B

93
Q

True or False: You can create a symbolic link from one low-level filesystem to another

A

True

94
Q

True or False: You can easily damage your Linux installation by typing the rm command when you log in to your regular account?

A

False

95
Q

True or False: You can set a directory’s timestamp with the touch command

A

True

96
Q

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/.

A

-u

97
Q

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.

A

rm -r junk

98
Q

The blank wildcard matches any one symbol in a filename.

A

?

99
Q

What directory primarily contains system configuration files?

A

/etc