Which command is used to list the contents of a directory in the command line?
M0-Command Line Basics Quiz

Quiz
•
Other
•
Professional Development
•
Hard
Katie Sylvia
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
`cd`
`ls`
`mkdir`
`rm`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What command is used to change the current directory to a specified directory?
`ls`
`cd`
`pwd`
`touch`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to display the current working directory?
`ls`
`cd`
`pwd`
`echo`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a new directory named "projects"?
`mkdir projects`
`cd projects`
`ls projects`
`rm projects`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to remove a file named "example.txt"?
`rm example.txt`
`rmdir example.txt`
`delete example.txt`
`erase example.txt`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you display the contents of a file named "notes.txt"?
`cat notes.txt`
`ls notes.txt`
`cd notes.txt`
`rm notes.txt`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which command is used to move a file named "report.txt" to a directory named "documents"?
`mv report.txt documents/`
`cp report.txt documents/`
`rm report.txt documents/`
`ls report.txt documents/`
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `-r` option do when used with the `rm` command?
Removes files recursively
Removes files forcefully
Removes only directories
Removes only files
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you copy a file named "data.csv" to a directory named "backup"?
`cp data.csv backup/`
`mv data.csv backup/`
`rm data.csv backup/`
`ls data.csv backup/`
Similar Resources on Quizizz
12 questions
BTS

Quiz
•
3rd Grade - Professio...
12 questions
Archivisches Erschliessen, Teil Digitale Archivierung, Teil 1/2

Quiz
•
Professional Development
7 questions
Logs Lambdatest

Quiz
•
Professional Development
10 questions
Am I a Moa #txt

Quiz
•
6th Grade - Professio...
10 questions
Kpop Music

Quiz
•
6th Grade - Professio...
10 questions
DevOps-1 [Git, CICD and Configuration Management]

Quiz
•
Professional Development
10 questions
Linux Basics

Quiz
•
Professional Development
12 questions
TXT Quiz- Easy

Quiz
•
KG - Professional Dev...
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade