Skip to content
Managing Files and Directories M08 Exam
-
When using the cp
command, you must provide both a source and a destination.
True or False?
-
Which option(s) can be used to prevent cp
from overwriting an existing file?
(choose two)
-
The command rm -r
will…
- generate an error;
-r
isn’t a valid option.
- remove a directory along with any files or subdirectories.
- prompt for each confirmation before deleting each file in a directory.
- remove only empty directories.
-
Which option can be used with the rm
command to prompt before deleting?
-
The rm
command can delete multiple files at once.
True or False?
-
Which of the following commands can be used to rename a file?
-
The touch
command can be used to:
(choose two)
- Create new files
- Change a file’s name
- Change ownership of a file
- Update the timestamp of existing files
-
Which of the following are glob characters?
(choose three)
- The square brackets
[
and ]
- The asterisk
*
- The question mark
?
- The dash character
-
-
The main purpose of using glob characters is to be able to provide a list of filenames to a command.
True or False?
-
The asterisk character is used to represent zero or more of any character in a filename.
True or False?
-
Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf
?
(choose two)
ls /etc/p???.**
echo /etc/???.*f
ls /etc/???.????
echo /etc/*?.*o?
-
Brackets cannot be used to a represent a range of characters.
True or False?
-
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]*