Unix/Linux Final Prep

Ace your homework & exams now with Quizwiz!

The ____ character instructs the vi editor to move the cursor to the end of the current line. Question options: dd ^ 0 $

$

The shell recognizes the ____ as starting a new variable. Question options: & $ \ /

$

The shell interprets ____ as instruction to run the pipeline that follows only if the preceding pipeline executes successfully. Question options: && || \ ;

&&

The ____ option for ls lists the directories of the current directory with a slash at the end of the name. Question options: -f -F --F --f

-F

The ____ option is used with the ls command to put a slash after all directory names and also to identify other kinds of files. Question options: -w -a -F -l

-F

The ____ command, when used with the ls command, displays the inode of files. Question options: -I -m -i -a

-i

The ____ option, used with the ls utility, provides information about a file’s access permissions. Question options: -l -i -w -p

-l

The ____ option, when specified with the sort utility, reverses the ASCII order. Question options: -ascii -rev -reverse -r

-r

The ____ option tells the grep command to reverse the sense of a search. Question options: -I -v -r reverse

-v

The ____ option tells the grep command to reverse the sense of a search. Question options: -v -r reverse -I

-v

The bash shell reads the ____ file in the home directory. Question options: .tcshrc .bashrc .cshrc .kshrc

.bashrc

The ____ command is used in the vi for moving the cursor down by 6 lines. Question options: 6j 6k 6h 6l

6j

The ____ command quits the vi editor without saving the changes made to a file. Question options: :wq !Q :q! -wq

:q!

The ____ command will copy the contents of the current file to a new file called "backup". Question options: :wq backup :w! backup :w backup :q backup

:w backup

The ____ command is used to instruct the editor to write the file and quit the editor. Question options: vi :wq exit :x

:wq

The tokens following the ____ must be files. Question options: > * >> <<

>

Which of the following symbol instructs the shell to create a new file and redirect the process to that file? Question options: >! < <! >

>

The ____ is a redirection character that instructs the shell to append data to the end of an existing file. Question options: < > >> |

>>

The ____ command moves the cursor to the end of the line and shifts the editor to the append mode. Question options: i a A H

A

The ____ control character is used to terminate a currently executing utility. Question options: CTRL-Q ESC CTRL-C CTRL-D

CTRL-C

The shell interprets the ___ key as a special character, one that indicates the end of the command to be executed, and start processing.

ENTER

Whenever a file is created, its name and its inode number are entered into the file's contents. True/False

False

The ____ environment variable holds the location of the user&#8217;s workspace or home directory. Question options: USER SHELL HOME PATH

Home

Which utility links multiple files simultaneously? Question options: In Is more mv

In

The shell looks for utilities in the directories in the ______ variable and reports on their location.

PATH

The shell looks for utilities in the directories in the ___ variable and reports on their location.

PATH

The command "ls -l file" displays the ____. Question options: Contents of the file. A list of files matching the filename specified. Command not found error. Permission information about the file.

Permission information about the file.

The ____ key is used with the more command to view the contents of the next page of a file. Question options: SPACEBAR PAGE DOWN ENTER DOWNARROW

SPACEBAR

The default field separator for the cut utility is a ___.

TAB

A user can redirect standard error and output into the same file in sh family shells. True/False

True

Both UNIX and Linux are case-sensitive. True/False

True

Every file has a unique absolute pathname. True/False

True

In UNIX/Linux, the prompt is displayed on the screen by a program called the shell. True/False

True

The character that separates a field is often called the field delimiter or field separator. True/False

True

The chmod command is used to change the mode of files. True/False

True

The field separator for the cut utility can be defined to be any character by using the -d option. True/False

True

The history command displays the executed command, with a number next to each command. True/False

True

The shell is an interactive command interpreter. True/False

True

The uniq utility compares only adjacent lines. True/False

True

The vi editor opens a file in the command mode. True/False

True

The ____ character instructs the shell to interpret a special character as an ordinary character. Question options: ! $ \ *

\

What command instructs the shell to NOT interpret the newline character that follows? Question options: \ | - >

\

The ____ command in vi is used to switch from the command mode to the append mode. Question options: u x a w

a

The ____ command displays the calendar for the year 1977. Question options: cal1977 cal 1977 cal 19 77 date 1977

cal 1977

The ____ command allows a user to change from the home directory to a new directory. Question options: dc ls cd who

cd

The "6x" command results in the deletion of six ____. Question options: lines words characters rows

characters

The shell starts a new separate environment called a ___ to execute the program associated with a command entered by the user.

child process

The______command is used to modify permissions on a file.

chmod

The ____ command in UNIX/Linux is used to clear the text on the screen. Question options: clear clr cls clean

clear

Which utility formats output into columns? Question options: comm column grep Is

column

The cut utility extracts ____ from a file. Question options: columns records rows lines

columns

The cut utility extracts ____ from a file. Question options: records rows lines columns

columns

The ____ command is used to display the current date and time in UNIX/Linux. Question options: time date datetime cal

date

The______utility displays the differences between two files.

diff

The ____ utility reads the arguments passed to it and writes the arguments back to the output. Question options: sleep pwd more echo

echo

The ____ permission is required to start a child shell and execute its contents. Question options: read execute admin write

execute

The ____ command is used to log off from a terminal environment. Question options: logoff close exit quit

exit

A ___ is a structure for arranging and retrieving data in files on the hard drive.

filesystem

An arrangement of files and directories in a hierarchical order is called a ____. Question options: filesystem path partition directories

filesystem

The ____ utility searches for lines containing strings in one or more files. Question options: cat who grep paste

grep

The ____ utility searches for lines containing strings in one or more files. Question options: paste who grep cat

grep

To the ______utility, the first argument is the target string, and all other arguments are files to be opened and searched.

grep

The ___ utility in UNIX/Linux is used for locating lines in a file that contain the words or the string of characters specified. Question options: lpr sleep /more grep

grep<

The ___ files are not displayed by the ls utility.

hidden

The ___ is the core of UNIX/Linux, and controls the central processing unit and all the hardware.

kernel

The ____ utility lists the names of the files and subdirectories created in the current directory. Question options: dir ps cd ls

ls

The ____ command is used to list the current files with a long listing of information. Question options: ls -l ls 1 ls ls-l

ls -l

The ______ command is used to display manual entry for a particular utility.

man

The ______command is used to create a new directory.

mkdir

The______ command allows files to be renamed as well as moved.

mv

The ___ file in the /etc folder contains a record for each user added to the system.

passwd

The first 10 character places, displayed in the listing of the ls -l command, show the ___ that are currently set for that file.

permissions

The ____ command is used to list the current processes. Question options: fg bg ps ls

ps

The______command is used to obtain a list of the user's current processes.

ps

The ____ command displays the list of all processes running on the entire system. Question options: ps -ax ps -ef ps-ef ps

ps -ef

The ____ command displays the path information from the top file system to the user&#8217;s current directory. Question options: cd pwd ls ls /

pwd

The ____ command displays the user's location in the filesystem. Question options: pwd cd ls -l oldpwd

pwd

The ____ command exits the more command. Question options: b !q :wq q

q

The ____ key quits the more utility and displays the shell prompt. Question options: x q Alt-F4 Alt-x

q

Which of the following commands is used to remove a file? Question options: rm mv lp cd

rm

The ____ command removes a directory and its files. Question options: rmdir rm dir rm -r rm

rm -r

The ____ user is granted extensive powers in UNIX/Linux to administer the system. Question options: root administrator super user power user

root

The topmost directory in UNIX/Linux is called the ___ .

root

The topmost directory, called ____, is symbolized by the first forward slash (/) in the pathname. Question options: admin home root parent

root

The sleep utility interprets its argument as the number of ____ it should wait before exiting. Question options: seconds milliseconds minutes hours

seconds

The command ____ targets all the lines beginning with "c" and deletes it in the file "caffeine". Question options: sed '/^d/c' caffeine sed '/^c/d' caffeine sed '/c/d' caffeine sed '/^c/^d' caffeine

sed '/^c/d' caffeine

The ____ utility displays the last 10 lines of the file specified as an argument to it. Question options: cat more tail head

tail

The ______ utility sends what it reads from its input in two directions: to a file named as an argument and to standard output.

tee

The command echo "$USER" displays ____. Question options: command not found. echo $. echo $USER. the login name of the user.

the login name of the user.

The ____ command is used for removing an alias associated with DIR. Question options: alias DIR=null alias -r DIR unalias DIR unalias -r DIR

unalias DIR

The ____ utility reads each line from a file, removes duplicate adjacent lines, and displays the results. Question options: cat sort uniq duplicate

uniq

The ____ command instructs the vi editor to move the cursor ahead by one word. Question options: x u h w

w

The ____ utility reports the number of lines, words, and characters in the contents of files. Question options: wc wc -c wc -l wc*

wc

The ____ utility reports the number of lines, words, and characters in the contents of files. Question options: wc -l wc -c wc* wc

wc

The ____ command is used to search the location of a utility. Question options: ps which who ls

which

In a multi-user system, the ______ command displays a list of currently logged on users.

who

The ____ command displays the number of users logged on to a multi-user system. Question options: who &gt; wc who &gt; wc-c who | wc -l who | wc

who | wc -l

The______command displays the current user's login name or username on the screen.

whoami

Which command tells the shell to connect the output of the previous process to the input of the next process? Question options: * | ' ' >

|

The shell interprets ____ as the path to the user's home directory. Question options: echo cd ls ~

~


Related study sets

Psych Chapter 24: Medications for substance use disorders

View Set

Principles of Microeconomics Exam 4

View Set

Principles Of Biology 1 (Evolution & Viruses)

View Set

Psychology - Ch. 6-8 Study Guide

View Set

Nurs 310 Fluid/electrolyte prepu questions

View Set

Chapter 13: Unique Nutrition Issues in the Older Adult

View Set