Chapter 8 Exam Flashcards

1
Q

When using the cp command, you must provide both a source and a destination.
True or False?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
Which option(s) can be used to prevent cp from overwriting an existing file?
(choose two)
  • z
  • n
  • N
  • i
A
  • n

- i

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

The command rm -r will…

remove a directory along with any files or subdirectories.
generate an error; -r isn’t a valid option.
remove only empty directories.
prompt for each confirmation before deleting each file in a directory.

A

remove a directory along with any files or subdirectories.

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

Which option can be used with the rm command to prompt before deleting?

A
-P
l
-i

A

-i

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

The rm command can delete multiple files at once.
True or False?

True
False

A

True

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

Which of the following commands can be used to rename a file?

cp
rm
mv
name

A

mv

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

The touch command can be used to:
(choose two)

Update the timestamp of existing files
Change ownership of a file
Create new files
Change a file’s name

A

Update the timestamp of existing files

Change a file’s name

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

Which of the following are glob characters?
(choose three)

The square brackets “[” and “]”
The question mark “?”
The dash character “-“
The asterisk “*”

A

The square brackets “[” and “]”
The question mark “?”
The asterisk “*”

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

The main purpose of using glob characters is to be able to provide a list of filenames to a command.
True or False?

True
False

A

True

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

The asterisk character is used to represent zero or more of any character in a filename.
True or False?

True
False

A

True

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

Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf?
(choose two)

ls /etc/???.????
echo /etc/???.f
echo /etc/
?.*o?
ls /etc/p???.**

A

ls /etc/???.????

echo /etc/???.*f

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

Brackets cannot be used to a represent a range of characters.
True or False?

True
False

A

False

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

Which command would list files that do not begin with a “T” or a “W”?

echo /etc/[TW!]
echo /etc/!TW
echo /etc/[!TW]

echo /etc/[*TW]!

A

echo /etc/[!TW]*

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