FactorPad
Build a Better Process

Linux Quiz 2d Covering the mv, tail, uniq, sdiff and sed Commands

This is the eighth 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-2d.html


An ad-free and cookie-free website.


Linux Command Line Quiz | 2d

Beginner

This is the fourth quiz from the Linux Essentials Playlist covering commands 21-40. Videos hosted on YouTube are also free and can be a bit more challenging because you're on the clock.

The videos run for 6 1/2 minutes so the pressure is higher, but we combine that with mellow background music to help with concentration. Below are the same 25 questions.

It's always here for you to refresh your memory of basic Linux commands. I hope you enjoy getting smarter faster. Good luck!

Video

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

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

The Quiz

Click the box to see the answer. It's all right here. Free and easy.

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


#1

How do you view bash history contents repeated in two columns?

$ paste .bash_history .bash_history

#2

How do you change the spelling of boyd to body in file1.txt?

$ sed -i '/s/boyd/body/' file1.txt

#3

How do you count the number of lines in your .bash_history file?

$ wc -l .bash_history

#4

How do you join file1.txt and file2.txt ignoring the header row?

$ join --header file1.txt file2.txt

#5

How do you print the first 10 lines (the default) of file1.txt?

$ head file1.txt


#6

How do you see if file1.txt and file1.bak have the same contents?

$ diff file1.txt file1.bak

#7

How do you show lines unique to each file1.txt and file2.txt?

$ comm file1.txt file2.txt

#8

How do you delete an empty directory called empty?

$ rm -d empty

#9

How do you create file3.txt from differences in file1.txt and file2.txt?

$ sdiff -o file3.txt file1.txt file2.txt

#10

How do you prompt before deleting an empty directory called empty?

$ rm -i empty


#11

How do you remove file1.txt with a prompt and a confirmation?

$ rm -iv file1.txt

#12

How do you count the number of bytes in file1.txt?

$ wc -c file1.txt

#13

How do you copy file1.txt to file1.bak if it is a newer version?

$ cp -u file1.txt file1.bak

#14

How do you print the first field in file1.txt?

$ cut -f 1 file1.txt

#15

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

$ sort -r .bash_history


#16

How do you remove a symbolic link called docs?

$ rm docs

#17

How do you create a bin directory followed by a confirmation?

$ mkdir -v bin

#18

How do you find all .conf files in all directories within /etc?

$ find /etc -name '*.conf'

#19

How do you get a warning before moving file1.txt to directory docs?

$ mv -i file1.txt docs

#20

How do you view the first 10 lines of the .bashrc file?

$ head .bashrc


#21

How do you view the version of the program that creates directories?

$ mkdir --version

#22

How do you print the last 20 lines from the bash history file?

$ tail -n 20 .bash_history

#23

How do you count the number of times mkdir is in your bash history?

$ grep -c "mkdir" .bash_history

#24

How do you list programs with math in the title or description?

$ apropos math

#25

How do you show unique rows in file1.txt, after the first character?

$ uniq -s 1 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?

If you found value here, then you are the type of person we'd like to connect with, please consider subscribing to our YouTube Channel, @factorpad on Twitter and at our no-spam email list for updates on new content.

Outline Back Tip Next

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


free quiz games
linux commands
linux command examples
online quiz
linux quiz
linux command line quiz
linux terminal
mv command quiz
tail command quiz
uniq command quiz
sdiff command quiz
sed command quiz

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