Linux Midterm
To execute the same command as previously executed five commands ago, you would type:
!-5
What option for the ls command will display all files, including hidden files?
-a
Which flag would you pass to command, "tar" in order to have it make a new archive?
-c
Which option for the "cut" command is used to specify a delimiter?
-d
Which option can be used with the rm command to prompt before deleting?
-i
A pipe allows you to:
..send the output of one command to another.
The top-level directory on a Linux system is represented as:
/
To start searching a man page, the first key you press is:
/
Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents? 2> | >> > &>
>>
The tilde (~) is used to represent:
A user's home directory
Unix is:
An operating system A trademark
Which of the following is a common server program?
Apache
Which of the following outcomes will you get after executing the tar -cvf hosts.tar /etc/h* command?
Archived file
The largest difference between the GPLv2 and BSD licenses is:
BSD has no copyleft provision
Linux is written in: C .NET C++ Java Perl
C
A license where you don't have access to the source code is called:
Closed Source
What services is used to translate domain names to IP addresses?
DNS
Ubuntu is derived from which distribution?
Debian
A maintenance cycle:
Describes how long a version of software will be supported
A release cycle:
Describes how often updates to the software come out
A generic term for Open Source and Free Software is:
FLOSS
The double ampersand characters ( && ) are used to separate commands to be executed conditionally, where if the command to the left of the ampersands fails, then the command to the right of the ampersands will be executed.
False
Which of the following commands scans the file to determine file locations? (Choose two.)
Find Locate
Linux is distributed under which license?
GPLv2
A "copyleft provision" in a software license means:
If you redistribute the software, you must distribute the source to any changes you make
Linux is not Unix because:
It hasn't undergone certification
If you want to store logins and passwords for different websites in a secure manner, you could use:
KeePassX
Which of the following is the core part of an operating system?
Kernel
If you wanted to write a report that was to be printed, you would probably use
LibreOffice
Which open source software includes various packages such as work processor, spreadsheet, graphics, database and math formula bar?
LibreOffice
One of the job of the kernel is to:
Manage the system's resources
If you want to enable one Linux computer to access files stored on another Linux Computer's hard disk, which of the following network protocols is the best choice?
NFS
Which of the following terms best characterizes the Linux kernel?
Open source
Which server software would you use to create a company directory that you could search and authenticate again
OpenLDAP
Which environment variable contains a list of directories that is searched for commands to execute?
PATH
Which of the following actions does the find command perform?
Searching a file in a directory
The Free Software Foundation believes that: (choose two)
Software should be free to share Software should be free to modify
In graphical mode, you can get to a shell by running which applications?
Terminal
Most of the tools that are part of Linux system come from:
The GNU Project
You try to compress a file that is already compressed. Which of the following statements is true?
The file will not be compressed any further than it already was
In virtualization, what are the host and guest? (choose two)
The host is the machine that runs the virtual machines A Guest is a virtual machine
A pair of single quotes ( ' ) will prevent the shell from interpreting any metacharacter. True or False?
True
The shell program interprets the commands you type into the terminal, into instructions that the Linux operating system can execute. True or False?
True
Where did the Linux kernel originate?
University of Helsinki
Open source means: (choose two)
You can modify the software's source code You can view the software's source code
Your company makes a hardware firewall that runs a custom Linux kernel. What are your obligations under GPLv2?
You must make the source to your kernel available
The cd command by itself will take you to what directory?
Your home directory
Which character that represents the start of a line in a regular expression?
^
The command syntax to display a large size file file1.txt one page at a time is:
cat file1.txt | more
Linux distribution of one user file system is shown in the diagram. Current user in their home directory, test and would like to change to the directory to dir1. What command would the user type using relative path?
cd dir1
Which command is used to extract a column from a text file?
cut
To be able to output messages to the screen, use the _______ command:
echo
Which of the following commands will append its output to output.file?
echo Testing >> output.file
POP and IMAP are related to:
The Samba application is a:
file server
What is the difference between grep and find commands?
grep searches in a file whereas find searches for files and directories
Which of the following commands is used to extract a compressed file?
gunzip
Which command is used to list first 6 lines of a file, file1.txt?
head -6 file1.txt
Which two pager commands are used by the man command to control movement within the document? (choose two)
less/more
The user wants to list all files with .jpg extension from the user home directory
ls *.jpg
Which of the following commands would you type to rename newfile.txt to afile.txt?
mv newfile.txt afile.txt
You type gzip myfile.tar. What happens? (choose two)
myfile.tar.gz holds a compressed version of myfile.tar myfile.tar is removed
To go to the next match of a search on a man page, press:
n
Is the following path absolute or relative? student/Desktop Choose "yes" for absolute or "no" for relative.
no
What command is used to view current directory?
pwd
In order to exit viewing a man page, press:
q
The command rm-r will:
remove a directory along with any files or subdirectories
Which of the following commands supports both gzip and bzip2 compression?
tar
Which command would you use to archive the Documents directory and compress it with bzip2 compression?
tar -cjf documents.tbz Documents
You have received a tarball called data88..tar from a colleague, but you want to check the names of the files it contains before extracting them. Which of the following commands would you use to do this?
tar -tvf data88.tar
Which command is used to display the operating system name?
uname
Select the command that can report the location of a command:
which
What command is used to know the logged in user?
whoami
Is the following path absolute or relatve? Choose "yes" for absolute or "no" for relative. /etc/PPP
yes
Which represents the user home directory:
~