Linux 5-8

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

To be able to output messages to the screen, use the _______ command: type echo display print

echo

Which command would list files that do not begin with a "T" or a "W"? echo /etc/*[TW!] echo /etc/!TW echo /etc/[!TW]* echo /etc/[*TW]!

echo /etc/[!TW]*

A pair of double quotes (" ) will prevent the shell from interpreting any metacharacter. True or False?

false

Brackets cannot be used to a represent a range of characters. True or False?

false

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. True or False?

false

The ls command color codes results by default. True or False?

false

The whatis command is the same as man -w. False True

false

Which option for the ls command, when used in conjunction with the -l option, will display human-readable file sizes? -S -H -h -M

h

What is the standard option to provide a command line program to view its documentation? -h -info -help -doc

help

The _______ command will print a list of the commands that you've previously executed. history eval exec list

history

Which option can be used with the rm command to prompt before deleting? A -P l -i

i

Which two pager commands are used by the man command to control movement within the document? (choose two) grep less page more

less and more

The ls command without options or arguments... ...prompts for a directory to list. ...generates an error as this command requires arguments. ...lists the contents of a user's home directory. ...lists the contents of the current directory.

lists the contents of the current directory.

he _____ command can be used to find any file, not just commands or man pages. apropos whereis whatis locate

locate

Which of these commands will return /etc/gai.conf /etc/pam.conf /etc/ucf.conf? (choose two) ls /etc/???.???? echo /etc/???.*f echo /etc/*?.*o? ls /etc/p???.**

ls /etc/???.???? and echo /etc/???.*f

To search the man page sections for the keyword example, which of the following command lines could you execute? (choose two) man -k example apropos example man -f example whatis example

man -k example and apropos example

To get help on using the info command, execute: (choose two) man info info -q info info help info

man info and info info

Which of the following commands can be used to rename a file? cp rm mv name

mv

Which option(s) can be used to prevent cp from overwriting an existing file? (choose two) -z -n -N -i

n and i

If you are reading the synopsis of a command from a man page, then items in square brackets are: Required arguments Comments Optional Required options

optional

In order to exit viewing a man page, press: q z x y

q

The command rm -r will... remove a directory along with any files or subdirectories. generate an error; -r isn't a valid option. remove only empty directories. prompt for each confirmation before deleting each file in a directory.

remove a directory along with any files or subdirectories

The asterisk character is used to represent zero or more of any character in a filename. True or False?

true

The command man -k is the same as the command apropos. True or False?

true

The main purpose of using glob characters is to be able to provide a list of filenames to a command. True or False?

true

The rm command can delete multiple files at once. True or False?

true

The semicolon (;) can be used to separate multiple commands to be executed in order. 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

Using a pair of back quotes ( ` ) will cause a shell to execute the back-quoted text as a command and substitute the output back into the original command. True or False?

true

The _____ command is normally executed daily to update the database of all files that are on the system. find locate search updatedb

updatedb

The _____ command is normally executed to search for a command or man page. updatedb whereis find man -k

whereis

Select the command that can report the location of a command: which what where

which

To execute the same command as previously executed five commands ago, you would type: @-5 !5 !-5 &5

!-5

The top-level directory on a Linux system is represented as: /home C: /root /

/

To start searching a man page, the first key you press is: f / s !

/

The directory where additional documentation for software packages most likely can be found is: /usr/software/doc /var/lib/doc /usr/share/doc /var/share/doc

/usr/share/doc

Commands typically executed by a user are covered in what section of the manual? 5 3 2 1

1

Hidden files are files that begin with what character? A plus (+) An asterisk (*) A dash (-) A period (.)

A period (.)

The tilde (~) is used to represent: Any two single characters Nothing; it has no special meaning The directory above the current working directory A user's home directory

A user's home directory

Is the following path absolute or relative? /etc/ppp Absolute Relative

Absolute

HOME is an example of _________. An environment variable A path variable An alias An internal command A local variable

An environment variable

The most common shell used for Linux distributions is the ________ shell. Zsh Fish Bash Tsch

Bash

The command ls -S will sort files: By modification date, newest to oldest By size, largest to smallest By number of symlinks, largest to smallest By size, smallest to largest

By size, largest to smallest

The acronym CLI stands for: Command Line Interpreter Command Line Interface Computer Line Interface Computer Link Interpreter

Command Line Interface

The whatis command will only return the first result for which section a man page is stored in. True or False?

False

Section 5 of the manual pages covers: System administration commands Games User commands File Formats

File Formats

The first character in a long listing (ls -l) indicates: The permissions The owner If something is a file, directory, or symbolic link The size

If something is a file, directory, or symbolic link

The echo command: Is used to output text to the console Copies variables from one to another Tests a variable for duplication Duplicates the input stream to the output stream Is used for variable assignment

Is used to output text to the console

Section 9 of man pages relates to what? Library Calls Games Kernel Routines System Calls Miscellaneous

Kernel Routines

The following sections commonly appear on a man page: (choose three) NAME LICENSE DESCRIPTION SYNOPSIS

NAME, DESCRIPTION and SYNOPSIS

Which environment variable contains a list of directories that is searched for commands to execute? PATH PS1 PS2 EXEC

PATH

To exit the info page, press: Q x z x

Q

Is the following path absolute or relative? ../../home/sysadmin Absolute Relative

Relative

Is the following path absolute or relative? sysadmin/Documents Relative Absolute

Relative

To get help while using the info command, press: g A Shift+H Shift+z

Shift+H

The double dot (..) can be used with the cd command to represent: A user's home directory. Any two single characters Nothing; it has no special meaning. The directory above the current working directory

The directory above the current working directory

The statement that describes the difference between a man page and an info page is: The man page is like a guide; the info page is a more concise reference. The info page is like a guide; a man page is a more concise reference. The man page is a long detailed reference; the info page is very terse. There is very little difference between them.

The info page is like a guide; a man page is a more concise reference

When interpreting the SYNOPSIS of a command found on a man page, the "|" means: The items it separates can be used together The items it separates cannot be used together

The items it separates cannot be used together

Which of the following are glob characters? (choose three) The square brackets "[" and "]" The question mark "?" The dash character "-" The asterisk "*"

The square brackets "[" and "]", The question mark "?", and The asterisk "*"

A pair of single quotes ( ' ) will prevent the shell from interpreting any metacharacter. True or False?

True

The info command merges all available documentation into a single "book". True or False? True False

True

The man command searches each of the sections in order until it finds a match. True or False?

True

When using the cp command, you must provide both a source and a destination. True or False?

True

The touch command can be used to: (choose two) Update the timestamp of existing files Change ownership of a file Create new files Change a file's name

Update the timestamp of existing files and Change a file's name

The cd command by itself will take you to what directory? None; it is not a valid command The system root directory Your home directory The directory above the current working directory

Your home directory

What one character treats the character that follows it as if it was surrounded by single quotes? \ # % /

\

Which of the following commands will prevent any aliased options to the ls command? %ls /ls `ls \ls

\ls

What option for the ls command will display all files, including hidden files? -a -L -H -w

a

The double dot (..) can be used to represent the directory... ...below the current directory. ...above the current directory. ...with any two single numbers. ...above the current directory only when using the cd command.

above the current directory.

What command will allow you to change your current working directory? list chdir ls cd

cd

Which of the following commands can be used to access the home directory of the user "bob" while logged in as root?(choose two) cd && cd /home/bob cd ~bob ~bob

cd /home/bob and cd ~bob


Kaugnay na mga set ng pag-aaral

Chapter 15, Stockholder's Equity Key Terms

View Set

Spanish 2 Clothes- Danica Williams

View Set

ID Ch 22 Background & Antibacterials

View Set

Accounting 2: Exam 2 (Ch. 6 & 7)

View Set

Chapter 43: Sleep Review Questions

View Set