• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/114

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

114 Cards in this Set

  • Front
  • Back
Which of the following is not a common internet service:

ftp
electronic mail
telnet
yellowpages
yellowpages
Every host on the internet must have a unique:

domain name.
IP address.
OSI reference number.
All of the above.
IP address.
Symbolic names are translated into a unique IP address by:

Domain Name Service
Internet Protocol Server
A local host file on each internet host computer.
File Transmission Protocol Service
Domain Name Service
The paradigm in which the software for a service is partitioned into two parts: one part running on one computer and another part running on a second is called.

client-server software model.
World Wide Web model
Internet model
It is commonly referred to by all of the above.
client-server software model.
The command which will interact with name servers specified in /etc/resolv.conf and display their responses is:

ipconfig
traceroute
dig
All of the above.
dig
Which UNIX command reports the status of processes?

stat
ps
proc
jobs
ps
How does UNIX determine which of the currently active processes will use the CPU next?

the process's priority value.
the process's position in the process sequence.
the process's job sequence number
the process's threshold priority number.
the process's priority value.
The process that is created by the fork system call:

is an exact copy of the original process.
is called the child process.
will terminate the parent process.
Both a and b.
Both a and b.
In UNIX, which of the following is not a valid process state?

Ghost
Zombie
Swapped
Waiting
All are process states
Ghost
How can you run a C shell script file: "myscript", when your current login shell is the bash shell?

enter /bin/csh myscript on the command line.
insert #!/bin/csh at the top of myscript before running it..
type /bin/csh at the command line then run myscript under the new shell.
All of these are correct.
All of these are correct.
Which of the following is a valid IPv4 (IP) address?

239.257.316.812
345.123.678.910
233.212.182.011
812.213.182.1
233.212.182.011
Each IP address on the internet has a unique symbolic name in the form:

machine.domain.location.type
host.location.id.domain
hostname.domain_name
host.domain.location.type
hostname.domain_name
Which command allows you to test the status of a network by sending a test signal to a remote computer and then displaying it's response?

ping
who
finger
traceroute
ping
Which internet service is used to transfer files of a variety of types between computers?

Telnet
FTP
HTTP
SMTP
FTP
How can a shell command be executed in the background?

type an & at the end of the command line.
precede the command with the bg command.
execute the command under a different shell.
Any of the above will work.
type an & at the end of the command line.
A shell script file is:

a series of c language commands executed together as a program.
a file containing special script commands which must be compiled prior to execution.
a list of shell commands which are executed one by one as if entered at the command line.
None of the above.
a list of shell commands which are executed one by one as if entered at the command line.
Which of the following is not used in calculating a process's priority value?

Nice Value
Threshold Priority
Recent CPU Usage
Owner's Priority Value
Owner's Priority Value
The ssh command

performs the same tasks as the rlogin command.
performs the same tasks as the rsh command.
uses public-key cryptography to authenticate a user before permitting a remote login.
All of the above.
All of the above.
The ptree command is used to:

display the directory hierarchy for the current working directory.
Display the process hierarchy for a specific process.
Display the process hierarchy for a specific user.
All of the above.
Both B and C are correct.
Both B and C are correct.
A network of networks is called:

mulitnetwork
network web
interconnected network
internetwork
internetwork
When specifying parallel execution of commands on one command line, commands are followed by:

;
|
&
,
&
Networks are connected to other networks through:

telephone lines
routers and gateways
network hubs
All of the above.
routers and gateways
In UNIX, PID means:

Parent Identification
Process Identification
Program Identification
Printer Identification
Process Identification
The command which will display the status of the first 15 of the most CPU intensive tasks on the system is:

top
ps -x
ps -t15
show -p15
top
Which network model is used by the internet?

ISO's OSI Reference Model
TCP/IP Model
Ethernet Network Model
PPP Protocol Model
TCP/IP Model
When a UNIX shell command is executed in the foreground:

it maintains control of the keyboard and the display screen.
another command can not be started until it is complete.
access to the shell is lost until the command in the foreground is completed.
All of the above.
All of the above.
Which process has no parent process and is considered the ancestor of all processes currently running?

kernel
startup
init
getty
init
The operating system code that implements the CPU scheduling algorithm is called a:

processor scheduler
quantum
round robin scheduler
priority manager
processor scheduler
What signal (number) is known as the sure kill?

1
2
9
15
9
In UNIX, a system process which is running in the background is called:

a system shell
a superuser job
a startup process
a daemon
a daemon
Most processes can be abnormally terminated by:

sending a software interrupt with the kill command..
entering control C (^C).
logging out of the system.
All of the above will work.
All of the above will work.
Most processes can be abnormally terminated by:

sending a software interrupt with the kill command..
entering control C (^C).
logging out of the system.
All of the above will work.
All of the above will work.
The exec system call:

executes an external binary command file.
allows a child process to become the command to be executed.
allows a process to overwrite itself.
All of the above.
All of the above.
Which command allows a process to continue even after the user logs out of the system?

ignore 1
nohup
continue
Logging out kills all processes.
nohup
The Bourne Shell command to create variable: "SUM" and assign "0" to it is:

set SUM to 0
SUM=0
int SUM = 0;
declare SUM then set SUM=0
SUM=0
What should be included in a program header as comment lines?

File name, shell name, date, and time.
Names of the file and author, dates written and modified, and the purpose and description.
all the programming libraries to be included.
Page number, date and program name.
Names of the file and author, dates written and modified, and the purpose and description.
Variables "name" and "place" can be made unchangeable by:

use of the readonly command.
removing the write permission from each.
use of the set +r command.
None of the above.
use of the readonly command.
If a shell script named: "redisplay" is executed with the following command line:

redisplay Hello World! Welcome to UNIX.

the environmental variable $3 contains what?

World!
Welcome
redisplay Hello World!
$3 will contain a null value.
Welcome
Which command can be used to display the value of a specific variable?

echo
cat
display
type
echo
A shell script file can be made executable by:

use of the shell script compiler.
renaming it to include an ".exe" extension.
placing it in the /usr/bin directory.
adding execute permission/s to the file using the chmod command.
adding execute permission/s to the file using the chmod command.
What is the output of the following shell script?

set `date`
echo $2 $3, $6

(Assume the output of the date command to be: Wed Jul 4 12:12:12 CDT 2001).

Wednesday July , 2001
July 4 2001
July Fourth, 2001
Jul 4, 2001
Jul 4, 2001
What must be done to the following shell script for it to execute properly (that is, terminate when the correct code is guessed)?

#!/bin/sh
echo "Guess your code: "
read guess
while [ "$secret" != "$guess"]
do
echo "Sorry wrong guess!"
echo "Guess your code: "
read guess
done

Give the secret code to the person running the script.
assign a secret code to the variable "$secret".
remove the double quotes in the test condition.
use the operator "-ne" instead of "!=" in the test condition.
assign a secret code to the variable "$secret".
What is the output of the following script file, when the input is: "UNIX rules the computing world!"?

#!/bin/sh
echo "Enter a line of input: "
read word1 word2 word3
echo $word3

the
the computing world!
rules
UNIX rules the computing world!
the computing world!
If option is equal to "d", what will be the result of the following statement?

case "$option" in
d) date
;;
l) ls
;;
w) who
;;
q) exit 0
;;
esac

date is displayed.
nothing since case is spelled backward on the last line.
the date, who, and ls commands are executed in sequence.
this is not a UNIX shell script command (it is C++).
date is displayed.
When will the following if statement yield a true result?

if [ -d $1 ]
then
echo "This is a ???"
fi

when $1 is a directory name.
when $1 has been deleted.
when $1 is a direct link.
when $1 has the write permission set.
when $1 is a directory name.
When a variable is created:

it is not known to subsequent sub shells.
is local to the shell in which it is created.
can be made available to subsequent shells only if exported.
All of the above.
All of the above.
A Bourne shell script is:

saved in an ordinary UNIX file.
consists of shell commands.
allows the use of programming logic.
supports the use of variables.
All of the above.
A, C, and D only.
All of the above.
A command line argument is:

known as a positional argument.
a user define variable.
required for shell scripts.
All of the above.
known as a positional argument.
What command is used to permit repeated execution of a block of code?

while
for
repeat
A and B only.
A, B, or C.
A and B only.
The read command:

reads one line of data.
assigns each word in a line of input to a list of variables entered after the read command.
reads from the stdin device.
All of the above.
All of the above.
The exit status of any successfully executing UNIX command or program is equal to:

1
-1
0
true
0
In addition to the values of the variable $user, what is the output of the following shell script?

#!/bin/sh
for user
do
echo "$user"
grep "$user" /etc/passwd | cut -f5 -d':'
done

the fifth field of each line in the /etc/passwd file.
the fifth field of each line in the /etc/passwd file which matches the value of $user.
each line in the /etc/passwd file which matches the command line arguments.
each line in the /etc/passwd file which contains an ':' .
the fifth field of each line in the /etc/passwd file which matches the value of $user.
All shell variables and their current values can be displayed by entering:

env
set
show
display
set
Which of the following is an example of command substitution?

echo `pwd`
pwd=/home/user01
$command=pwd
echo "pwd"
echo `pwd`
A shell script containing the following statement, must have how many command line arguments?

if [ $# -eq 0 ]
then
echo "Usage: $0 ordinary_file"
exit 1
elif [ $# -gt 1 ]
then
echo "Usage: $0 ordinary_file"
exit 2
fi

2 or more
1
is not determined by this statement.
any number greater than 1.
1
The name of the shell script when executed as a program is stored in the variable:

$0
$1
$PROGRAM
$COMMAND
$0
Shell scripts are written with syntax and logic which is similar to:

a C++ program.
a Visual BASIC program.
a Pascal program.
A and C only.
A, B, and C.
A, B, and C.
What is the output of the following shell script?

for name in `cat filelist`
do
echo "$name"
done

the contents of the variable $name.
$name
each separate word (string) in the file.
cat on one line followed by filelist on the second.
each separate word (string) in the file.
A variable can be removed by:

use of the reset command.
use of the unset command.
use of the del command.
use of the rm command.
use of the unset command.
A shell script containing the following statement, must have how many command line arguments?

if [ $# -eq 0 ]
then
echo "Usage: $0 ordinary_file"
exit 1
elif [ $# -gt 1 ]
then
echo "Usage: $0 ordinary_file"
exit 2
fi

2 or more
1
is not determined by this statement.
any number greater than 1.
1
The name of the shell script when executed as a program is stored in the variable:

$0
$1
$PROGRAM
$COMMAND
$0
Shell scripts are written with syntax and logic which is similar to:

a C++ program.
a Visual BASIC program.
a Pascal program.
A and C only.
A, B, and C.
A, B, and C.
What is the output of the following shell script?

for name in `cat filelist`
do
echo "$name"
done

the contents of the variable $name.
$name
each separate word (string) in the file.
cat on one line followed by filelist on the second.
each separate word (string) in the file.
A variable can be removed by:

use of the reset command.
use of the unset command.
use of the del command.
use of the rm command.
use of the unset command.
The exec command can be used to:

to open and close file descriptors.
to make a file executable.
to allow a superuser login session.
All of the above.
to open and close file descriptors.
Referring to the EXAMPLE A shell script, what would happen if a user typed the following command line?

addall 1 4 9 16 25 36 49

count is equal to 7
sum is equal to 139
an error occurs after the done statement
all of the above.
count is equal to 7
If the command:
exec date
is typed at the command line, what happens.

the date is displayed.
the login session is terminated.
an error occurs.
All of the above.
A and B only.
A and B only
In EXAMPLE A shell script below, what occurs if no command line argument is entered after the script name?
#!/usr/bin/sh
# EXAMPLE A shell script
# Filename addall
if [ $# = 0 ]
then
echo "Usage: $0 number-list"
exit 1
fi
sum=0
count=0
while [ $# != 0 ]
do
sum=`expr $sum + $1`
count=`expr $count + 1`
shift
done
echo "The sum of the given $count numbers is $sum."
exit 0

The correct usage message is displayed.
The script stops without doing any calculations.
There are no numbers to add.
All of the above.
A and C only.
All of the above.
The interrupt processing feature of the Bourne Shell:

allows a shell to ignore interrupts.
intercepts an interrupt and takes a specified action.
allows the creation of new interrupts as desired.
All of the above.
A and B only.
A and B only.
The here document:

is standard on UNIX systems and can be found at /usr/sbin/here.
is useful in encapsulating data which changes frequently
is available only in the C shell.
redirects standard input to a command and attaches it to data typed in the script.
redirects standard input to a command and attaches it to data typed in the script.
What is the result of the following command line? var1=`expr $var1 \* $var1`

all filenames beginning with var1 are saved.
var1 is squared.
var1 is first divided by itself then multiplied by itself.
the same as var1 * var1.
var1 is squared.
Assume the following is entered into a shell script:
ls ~ | while read file
do
ct=`expr $ct + 1`
echo $ct. $file
done
What will be displayed?

The count of the number of files in the user's home directory.
Each entry in the user's home directory.
The file permissions of each entry in the user's home directory.
All of the above.
A and B only.
A and B only.
Referring to EXAMPLE A shell script, what is the purpose of the exit commands?

Provides an exit from the loop.
Terminates the shell script.
Provide a numeric exit status value.
All of the above.
B and C only.
B and C only.
Referring to EXAMPLE A shell script, what is the value of $# when the loop terminates?

0
7
1
undefined
0
A function is used:

to create an encapsulated block of code to be called when needed in a shell script.
must be created in a c program and then compiled.
is legal only in the c shell.
all of the above.
to create an encapsulated block of code to be called when needed in a shell script.
An interrupt is generated by:

entering control C.
logging out of the system.
by the kill command.
All of the above.
A and C only.
All of the above.
Referring to EXAMPLE A shellscript, what does the shift command do?

shifts through the digits on the command line.
shifts the values on the command line to $1 in sequence.
causes the value $# to be recalculated.
All of the above.
B and C only.
B and C only.
Assume the following statement occurs first in a shell script:
if [ $# = 0 ]
then
directory="."
fi
What happens if the shell script is run without an argument?

The user's home directory is used.
The current working directory is used.
The user will be asked to supply a directory.
None of the above.
The current working directory is used.
If the following command occurs in a Bourne shell script:
trap ' ' 2 3
what will occur when it is executed.

the interrupts in the list are ignored.
signals 2 and 3 will cause the script to terminate.
all signals except 2 and 3 are ignored.
the trap command works only in the c shell.
the interrupts in the list are ignored.
What does the following code do?
mystery()
{who; date; ls}

Creates a function called mystery.
creates a single link to who, date, and ls.
Runs the mystery script, who, date , and ls in sequence.
All of the above
A and C only.
Creates a function called mystery.
What command allows arithmetic calculations to be performed with shell variables?

expr
calc
any command using the assignment operator.
arithmetic calculations can't be performed in a Bourne shell scirpt.
expr
The Bourne shell does not have built-in capability for:

numeric integer data processing.
repetition structures.
selection logic.
All of the above.
A and C only.
numeric integer data processing.
A keyboard interrupt is:

created by typing control C.
generates signal 2.
defaults to the exit command.
All of the above.
A and B only.
All of the above.
Referring to EXAMPLE A shell script, what would happen if you deleted the shift command?

An infinitely executing loop occurs.
Both Sum and Count would be equal to 7.
The exit status is set to 1.
All of the above.
An infinitely executing loop occurs.
The hangup interrupt is created when:

a user disconnets from a dialup connection.
a user logs out of the system.
a time out occurs in the time sharing algorithm.
All of the above
A and B only.
A and B only.
The following command
exec < customer
results in the following:

Opens file customer as stdin.
Attaches file customer to stdout.
Executes shell script customer.
None of the above.
Opens file customer as stdin.
If you run a Bourne shell script with the flags x and v, for example:
sh -xv myscript
What happens?

the script is run in fast mode.
the script is run with xv as the first command line argument.
the script is executed in debug mode with verbose comments.
the script will not terminate if an error occurs.
the script is executed in debug mode with verbose comments.
Assume the following shell script is executed:

wierd()
{ ls $1 }
wierd $1
shift
wierd $1
shift
wierd $1

What happens?

function wierd is executed three times.
if three command line arguments are not provided, the current working directory is substituted for each missing argument.
the contents of up to 3 directories entered on the command line may be displayed.
all of the above.
all of the above.
If the following command lines are entered:
exec > data
ls $1
exec > /dev/tty
What happens?

the first name in file data is used as $1 in the ls command.
the directory of $1 is stored in file data.
data is executed and the shell terminates before the ls command is performed.
the output of the command is sent to /dev/tty.
the directory of $1 is stored in file data.
Refer to EXAMPLE B in the question above. How many times does the for loop execute?

Once for each value in the current working directory.
Once for each separate value in the file: "filelist".
Impossible to know without counting the values in the directory.
Until there are no more files in the current working directory.
Once for each separate value in the file: "filelist".
The purpose of the following line in a C shell script: #!/bin/csh is to:

cause the script to be executed as a C shell script only..
allow the script to be run as a C shell script from another shell.
assures that the C shell is the one used to interpret the script.
All of the above
A and B only.
All of the above
What is the result of the following C Shell command?
set name = John Doe II

variable name is created with the value of John Doe II.
variable name is created with value of John.
variables name, Doe and II are created.
None of the above
B and C are correct.
B and C are correct.
The relationship between the C shell and the C programming language is:

that they are virtually identical.
that some C language syntax works in some C shell commands.
no relationship at all.
that the C shell is a C language interpretor.
that some C language syntax works in some C shell commands.
Refer to EXAMPLE B in a previous question. What is argv?

An array of positional parameters.
a generic reference to the values in argv[1] through argv[9].
The same argv which stores the command line arguments.
All of the above.
A and B only.
All of the above.
What is the difference between: unset country and set country ?

They are identical.
unset deletes the variable.
set gives country a null value.
B and C are both correct.
B and C are both correct.
Given the following code segment in a C shell script,

while ("$secretcode" != "$yourguess")
echo "Good guess but try again!"
echo -n "Enter your guess: "
set yourguess = `head -1`
end

What will cause the loop to continue?

When $yourguess is equal to $secretcode.
When $secretcode gets a new value making it equal to $yourguess.
When $secretcode is equal to head -1
When $yourguess is not equal to $secretcode.
When $yourguess is not equal to $secretcode.
Assuming that execute permission for a shell script named: "testscript" is not given, then the script:

cannot be executed.
can be executed with the command: /bin/csh testscript
can be executed by adding as the first line in the script #!/bin/csh
can be executed by typing sh testscript.
can be executed with the command: /bin/csh testscript
Given the following C Shell command line:
displayit Hello World! Welcome to UNIX.
What variable will contain the word "Welcome".

$argv[3]
$3
displayit
None of these.
Both A and B.
Both A and B.
Assume you are given the following shell script:

#!/bin/csh
#EXAMPLE B
foreach filename (`cat filelist`)
set argv = `ls -il $filename`
set inode = $argv[1]
set size = $argv[5]
echo $filename $inode $size
end

What is the value of $argv[1]?

The first field of the output of ls -il.
first value listed in filelist.
ls
it has no value
The first field of the output of ls -il.
C Shell Environmental variables with their values can be displayed with the command:

set
env (on System V)
printenv (on BSD)
All of the above.
B and C only.
All of the above.
How can you execute a C shell script from a Bourne shell login script?

start a C shell then run the script.
enter on the first line the statement: #! /bin/csh
run the script with the command: "/bin/csh scriptname".
All of the above.
All of the above.
When using the C Shell, if the following set of variables have the values indicated:
argv[1]="UNIX"
argv[2]="rules"
argv[3]="the"
argv[4]="world"
then, if the command shift is executed from the command line twice in succession, what will the value of argv[2]?

rules
the
world
UNIX
world
What is the result of the following C Shell command?

set line = `head 1`

outputs the first line of a redirected text file.
reads one one line from stdin into variable "line".
resets the variable "line" to the string "head 1"
stores the first line of head in variable "line".
reads one one line from stdin into variable "line".
Which C shell command is used to export a variable to new shells so they will be "global"?

export $avariable
setenv variable "some value"
set variable = "some value"
This is not possible in the C shell.
setenv variable "some value"
The first argument on the command line when executing a C shell script is stored in the variable:

$argv[1]
#1
argument1
A or B is correct.
$argv[1]
What C Shell command will create variable username and assign it the value of "George W. Bush"?

set username = George W. Bush
setenv username "George W. Bush"
@username = George W. Bush
All of the above
setenv username "George W. Bush"
When using the C Shell, values can be assigned to shell variables with the command:

@
set
setenv
All of the above
B and C only.
All of the above
Given the following C Shell statement:
if ( ($#argv == 0) || ($#argv > 1) )
then
echo "Usage: $0 ordinary file"
exit 1
endif
what condition will cause the echo command to be executed?

when $#argv is 1.
if no file name is listed on the command line.
if more than one filename is listed on the command line.
B and C only.
None of the above.
B and C only.
Using the C Shell, the total number of command line arguments is stored in variable:

$#argv
$#
$@
All of the above
Both A and B
Both A and B
Given the following block of code in a C Shell script:

#EXAMPLE C
set option = $argv[1]
switch ("$option")
case [dD]: date
breaksw
case [lL]: ls
breaksw
case [wW]: who
breaksw
case [qQ]: exit 0
breaksw
endsw

What value of $option will cause the date to be displayed?

d
D
dD
All of the above.
Responses A or B will work.
Responses A or B will work.
Refer to EXAMPLE C in the question above. What will happen if the first command line argument is equal "X"?

None of the case statement options will be executed.
the case will default to the last option.
An error message will be displayed.
Both A and C
None of the case statement options will be executed.
Given the following statement, in C Shell script: demo1:
if ( -f $argv[1] )
then
set filename = $argv[1]
set fileinfo = `ls -il $filename`
endif
What will be the value of $filename if the following command line is entered?
demo1 customers addresses

it will be equal to customers.
it will be equal to addresses.
it's value is undefined because 2 filenames were entered..
it's value is demo1.
it will be equal to customers.
What C Shell environmental variable is set equal to the current working directory?

$dir
$cwd
$pwd
$wd
$cwd
Refer to Example B in the previous question. What is the format of the output?

A single line of output with the filename, inode, and size shown.
the value of filename and the first and fifth field of the file.
a table of filenames, and the first field, and second field of the data in the file.
A table of filename, inode sizes, and file sizes.
A table of filename, inode sizes, and file sizes.