Managing Files and Directories

Linux Essentials +

Chapter 8: Managing Files and Directories

Writing here

Questions and Answers

Q1

Which option(s) can be used to prevent cp from overwriting an existing file? (choose two)1. -i 2. -n


Q2

Which option can be used with the rm command to prompt before deleting?-i (prompts before deleting each file)


Q3

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


Q4

The touch command can be used to: (choose two)1. Update the timestamp of a file 2. Create a new file


Q5

Which of the following are glob characters? (choose three)1. Square Brackets [] 2. Asterisk * 3. The Question Mark ?


Q6

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


Q7

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

>

Q8


Q8

Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf? (choose two)1. echo /etc/*?.*o? 2. echo /etc/???.*f


Q9

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


Q10

Which command would list files that do not begin with a T or a W?echo /etc/[!TW]*