Command line.
Several of the questions require you to log into the training server to get your answers. If you have any problems or need help, let me know.
Questions and Answers
1.
What command lists files in current directory?
2.
What command lists files in current directory including owner and group information?
3.
If you are in your home directory, how do you list list files in the current directory and sub directories?
4.
If you are in your home directory, how do you list files with user, group and size of file including hidden files?
5.
How do you list files in your current directory and all files 2 levels deep?
6.
From the root directory, find files in /var/test/ directory with the name test3.txt
7.
How do you find files in your current directory modified more than 48 hours ago
8.
How do you find files in your current directory modified less than 60 minutes ago.
9.
How do you find files in your current directory that are world writable.Note: use short syntax (ogw)
10.
Which commands will list all files and folders in your home directory.
A. 
Ls ~
B. 
Dir ~
C. 
Ls -la ~
D. 
Ls -la ~/*
E. 
Find ~
11.
How do you view the entire contents of a file and make each line display the line number?
12.
How do you view the last 100 lines of a file?
13.
What is the command to find the line with "ERROR" in the file /var/test/data/test. Copy the results of the command into your answer.
14.
Assuming you are in the folder /var/test/data/, what is the command to find the line with "ERROR" in the file
/var/test/data/test and in all files in folders below /var/test/data/. Enter the command into your answer.
15.
What is the command to forcibly delete all files in the current directory?
16.
What is the command to forcibly delete all files in the current directory ending in .sh?
17.
What is the command to create an empty file named emptyfile.txt?
18.
What is the command to display the first 5 lines of /var/test/data/test ?
19.
Which methods are correct for querying 10.2.4.42 for the ip address of lyris.com
A. 
Dig -x @10.2.4.42 lyris.com
B. 
Dig @10.2.4.42 lyris.com
C. 
Nslookup 10.2.4.42 lyris.com
D. 
Nslookup -10.2.4.42 lyris.com
20.
What is the dig command to get a hostname by supplying the ipaddress?
21.
What is the command to view data in real time as it is being added to a file (log file)
22.
Using tail and grep, how do you view only lines with the word ERROR as they are being added to the file "test" (assuming test is a log file that is constantly being written to).
23.
What is the command to update all software packages on a server?
Those beginning their Linux careers may find the Linux Essentials certification an excellent place to start before jumping into the more advanced LPIC certifications. Linux Essentials cover necessary skills, such as command-line...
Questions: 80 | Attempts: 41230 | Last updated: Mar 22, 2022
Sample Question
Which command displays the list of groups to which a user belongs?
Ever since the Linux operating system rose in popularity, one of the most common questions about it is, "With all the different Linux distributions out there, which one is right for me?"
Well, wonder no more! We have...
Questions: 8 | Attempts: 24484 | Last updated: Mar 22, 2022
Get ready for this Linux command line quiz that will not only test your Linux command knowledge but will also enhance it. Linux is a family of open-source operating systems. Many of the programmers and ethical hackers use Linux...
Questions: 10 | Attempts: 18813 | Last updated: Mar 22, 2022
Sample Question
What command clears the contents of your terminal display?