FactorPad
Build a Better Process

Linux Command Quiz 2b Covering mkdir, wc, find, diff and join Commands

This is the sixth quiz with a video set to relaxing music.
  1. Study - Review the first 20 commands in the Linux Essentials YouTube Playlist, or 20 web pages found here.
  2. Quiz - Watch the video and see how many answers you get correct.
  3. Next - When you're ready to move on to the next Quiz click Next.
face pic by Paul Alan Davis, CFA
Updated: February 24, 2021
As with learning to code, the feedback loop is vital and here we cover the second 10 commands from Linux Essentials so you can see what you need to reinforce.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / quiz-2b.html


An ad-free and cookie-free website.


Linux Command Line Quiz | 2b

Beginner

This is the second quiz covering the second set of 20 commands. The YouTube video that accompanies this page is more difficult because it covers 25 questions in 6 1/2 minutes. I suggest giving it a try too.

The point of having multiple learning modes, meaning text and video, is that you'll learn faster. It's like cross-training for your brain. And when you use the linux tutorials try typing everything, that way your hands will be involved too.

Both video and text here cover the same 25 questions. If you haven't heard the mellow focus-inspiring music in the video, give it a try. Jeez, you could even make it a game, like a pub quiz game. The possibilities are endless. Enjoy.

Video

Videos can also be accessed from the Linux Essentials Playlist on YouTube.

Linux Command Line Quiz for Beginners | 2b (6:28)

The Quiz

Click the box to show the answer. It's easy and free.

You may need to upgrade from Internet Explorer to use this functionality.


#1

How do you count the number of words in all files in a directory?

$ wc -w *

#2

How do you print the last 10 lines (the default) of your .bashrc file?

$ tail .bashrc

#3

How do you show the help screen for the sdiff command?

$ sdiff --help

#4

How do you remove dir1 directory and its 8 files with a confirmation?

$ rm -vr dir1

#5

How do you delete file1.txt with a confirmation message?

$ rm -v file1.txt


#6

How do you show the unique lines in the sorted file1.txt?

$ uniq file1.txt

#7

How do you join file1.txt and file2.txt on the second field?

$ join -1 2 -2 2 file1.txt file2.txt

#8

How do you show all lines and numbers for pwd in bash history?

$ grep -n "pwd" .bash_history

#9

How do you show the first 8 lines of your .bash_history file?

$ head -n 8 .bash_history

#10

How do you view help on the diff command?

$ diff --help


#11

How do you show programs with grep in the title or description?

$ apropos grep

#12

How do you show characters 1 to 5 from all rows in bash history?

$ cut -c 1-5 .bash_history

#13

How do you backup file1.txt as file1.bak with a confirmation?

$ cp -v file1.txt file1.bak

#14

How do you create a directory called bin with a confirmation?

$ mkdir -v bin

#15

How do you paste file1.txt and file2.txt together with a ; delimiter?

$ paste -d ";" file1.txt file2.txt


#16

How do you create a hard link to file1.txt contents called f1?

$ ln file1.txt f1

#17

How do you sort the bash history file in reverse order?

$ sort -r .bash_history

#18

How do you view the help screen for making links to files?

$ ln --help

#19

How do you view corrected spelling of appel as apple in file1.txt?

$ sed 's/appel/apple/' file1.txt

#20

How do you find files ending in .txt in the current and sub-directories?

$ find . -name "*.txt"


#21

How do you compare all lines in file1.txt and file2.txt?

$ comm file1.txt file2.txt

#22

How do you move file1.txt to an existing directory called files?

$ mv file1.txt files

#23

How do you locate commands associated with the word sort?

$ apropos sort

#24

How do you duplicate the .bashrc file with a .bak extension?

$ cp .bashrc .bashrc.bak

#25

How do you show the last 200 bytes of file1.txt?

$ tail -c 200 file1.txt


Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:


What's Next?

I'd love to have you join our growing community of Linux and data science lovers on YouTube, Twitter and at our no-spam email list.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / quiz-2b.html


linux quiz online
linux command line
linux shell quiz
pub quiz questions
linux command line quiz
mkdir command quiz
linux certification quiz
wc command quiz
find command quiz
diff command quiz
join command quiz

A newly-updated free resource. Connect and refer a friend today.