Linux Quiz 2c Covering cp, head, sort, comm and grep Commands
This is the seventh quiz with a video set to relaxing music.
Study - Review the first 20 commands in the Linux
Essentials YouTube Playlist, or 20 web pages found here.
Quiz - Watch the video and see how many answers you
get correct.
Next - When you're ready to move on to the next Quiz
click Next.
Published: December 18, 2016
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
Linux Command Line Quiz | 2c
Beginner
This is a quiz accompanying the Linux Essentials Tutorial series and
comes in both video and text-based content. Here in HTML we cover commands
21-40. Start with the YouTube video set to cool music or jump
right in here.
The Linux command line quiz in video runs for 6 1/2 minutes and is a
little more difficult than the free text-based quiz below. The
25 questions are the same however. Either way you should have fun and
it will be a good challenge. Please enjoy and happy learning!
Video
Videos can also be accessed from the
Linux Essentials Playlist on YouTube.
VIDEO
Linux Command Line Quiz for Beginners | 2c (6:28)
The Quiz
It's easy, click the box to display the answer.
You may need to upgrade from Internet Explorer to use this functionality.
#1
How do you show a count of words in
file1.txt?
$ wc -w file1.txt
#2
How do you sort the bash history file then count
each unique line?
$ sort .bash_history | uniq -c
#3
How do you make a symbolic link to documents
directory calling it doc?
$ ln -s documents doc
#4
How do you use NA for blank data when joining
file1.txt and file2.txt?
$ join -e NA file1.txt file2.txt
#5
How do you show the first 5 lines of the .bashrc
file?
$ head -n 5 .bashrc
#6
How do you delete a directory called files and its
contents?
$ rm -r files
#7
How do you show common lines in file1.txt and
file1.bak?
$ comm -12 file1.txt file1.bak
#8
How do you select a second file's contents when
prompted by sdiff?
$ r
#9
How do you copy file1.txt to an existing directory
called backup?
$ cp file1.txt backup
#10
How do you make a templates directory in another
called app?
$ mkdir -p app/templates
#11
How do you select characters two to four in each
row of file1.txt?
$ cut -c 2-4 file1.txt
#12
How do you show programs that start with
grep?
$ apropos -w grep*
#13
How do you show the number of lines in
file1.txt?
$ wc -l file1.txt
#14
How do you create a bin directory with a
confirmation message?
$ mkdir -v bin
#15
How do you create file2.txt that is
file1.txt sorted?
$ sort --output='file2.txt' file1.txt
#16
How do you print lines in .bashrc that include the
term case?
$ grep "case" .bashrc
#17
How do you show the last 7 lines of the
.bash_history file?
$ tail -n 7 .bash_history
#18
How do you create a reminder before deleting
file1.txt?
$ rm -i file1.txt
#19
How do you show changes needed to make file1.txt
equal file2.txt?
$ diff file1.txt file2.txt
#20
How do you find files in the bin directory
including zip in the name?
$ find /bin -name '*zip*'
#21
How do you select rows in .bash_history with the
word nano?
$ grep "nano" .bash_history
#22
How do you paste rows in file1.txt and file2.txt
without a delimiter?
$ paste file1.txt file2.txt
#23
How do you edit file1.txt with the correct
spelling of hmtl as html?
$ sed -i 's/hmtl/html/' file1.txt
#24
How do you move file1.txt into docs directory
only if it is newer?
$ mv -u file1.txt docs
#25
How do you see a prompt before copying file1.txt
to file1.bak?
$ cp -i file1.txt file1.bak
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: