Basic Unix Command Line Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Ijstokes
I
Ijstokes
Community Contributor
Quizzes Created: 1 | Total Attempts: 6,745
| Attempts: 6,745 | Questions: 8
Please wait...
Question 1 / 8
0 %
0/100
Score 0/100
1. How do you create a new directory called flower?

Explanation

The correct answer is "mkdir flower". This command is used to create a new directory in a file system. In this case, the directory is named "flower".

Submit
Please wait...
About This Quiz
Basic Unix Command Line Quiz - Quiz

A command line is sometimes referred to as a command screen and it is an interface used to type commands directly to a computer using a keyboard and... see morenot the mouse. Take the test below and see how much you understand the Unix command line and its uses. All the best! see less

2. How do you display a listing of file details such as date, size, and access permissions?

Explanation

The command "ls -l" is used to display a detailed listing of files, including their date of creation or modification, size, and access permissions. This command provides a comprehensive view of file details in a structured format, making it easier for users to analyze and manage their files.

Submit
3. Change the current directory to /usr/local/bin.

Explanation

The correct answer is "cd /usr/local/bin". This command is used to change the current directory to /usr/local/bin. The "cd" command stands for "change directory" and is followed by the path of the directory you want to navigate to. In this case, it specifies the path /usr/local/bin as the new directory.

Submit
4. How do you get help about the command cp?

Explanation

The correct answer is "man cp" because "man" is a command in Unix-like operating systems that is used to display the manual pages for a given command. In this case, "man cp" would display the manual page for the "cp" command, providing detailed information and instructions on how to use it.

Submit
5. What is the command to search all files in your current directory for the word plasmodium?

Explanation

The correct answer is "grep plasmodium *". The "grep" command is used to search for a specific pattern or word in files. In this case, it will search for the word "plasmodium" in all files in the current directory. The "*" is a wildcard character that represents all files in the directory.

Submit
6. How do you rename a file from new to old?

Explanation

To rename a file from "new" to "old", the correct command is "mv new old". The "mv" command is used to move or rename files and directories in Unix-like operating systems. By specifying the current name of the file ("new") and the desired new name ("old"), the file is effectively renamed.

Submit
7. How do you print the first 15 lines of all files ending by .txt?

Explanation

The correct answer is "head -15 *.txt". The "head" command is used to print the first few lines of a file. By using the option "-15", it specifies that we want to print the first 15 lines. The "*.txt" part is a wildcard that matches all files ending with ".txt". Therefore, the command "head -15 *.txt" will print the first 15 lines of all files ending with ".txt".

Submit
8. How do you display the contents of a file myfile.txt?

Explanation

D is also correct, however for large files C is preferred.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 30, 2010
    Quiz Created by
    Ijstokes
Cancel
  • All
    All (8)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
How do you create a new directory called flower?
How do you display a listing of file details such as date, size, and...
Change the current directory to /usr/local/bin.
How do you get help about the command cp?
What is the command to search all files in your current directory for ...
How do you rename a file from new to old?
How do you print the first 15 lines of all files ending by .txt?
How do you display the contents of a file myfile.txt?
Alert!

Advertisement