DCOM 142 FINAL EXAM QUSTIONS AND ANSWERS
Which of the following statements is included is a case statement to denote the end of a
case statement? - Answers -esac
What key(s) will enable insert mode in "vi" editor? - Answers -"i" key
What key will you use to delete a line in "vi" editor? - Answers -"dd"
what key will you use to delete a line in "vi" editor? - Answers -"dd"
After using a text editor to create a shell script, what step should you take before typing
to use the script by typing its name? - Answers -Set one or more executable bits using
chmod
Which of the following entries is maintained at the first line of the bash script? -
Answers -#!/bin/bash
Which of the following extensions is used at the end of the script name? - Answers -.sh
What is the effect of the following short script, ex1, if it's called as ex1 big.c big.cc?
#!/bin/bash
cp $2 $1 - Answers -it copies the contents of big.cc to big.c, eliminating the old big.c
Given the following script that is run through ./test.sh hello goodbye :
if [ -f $2 ]; then echo "I am here" fi - Answers -if a file called "goodbye" exists in the
current directory the script will always print "I am here"
True or False; Valid looping statements in Bash include for, while and if-elseif-fi. -
Answers -False
True or False: A user types myscript laser.txt to run a script called myscript. within
myscript, the $0 variable holds the value laser.txt - Answers -False
Which of the following is a physical arrangement in a computer that contains the
computer's basic hardware and components? - Answers -Motherboard
Which of the following is the valid device file name for the first IDE hard drive on the
system? - Answers -/dev/hda
Which of the following are valid partitioning types (choose two) - Answers -MBR
GPT
Choose all of the following statements that are true in regard to virtual RAM (choose
three) - Answers -Virtual RAM is used when available physical RAM is low.
, Virtual RAM is stored on a hard drive.
Virtual RAM is also called swap space.
What command is used to display all hard drive partitions? - Answers -fdisk -l
Which of the following tools is best suited to installing a software package and all of its
dependencies on a Debian computer? - Answers -apt-get
What is the usual name of the first process that the Linux kernel runs, aside from itself?
- Answers -init
Which of the following tools can you use to identify running processes? (choose two) -
Answers -ps
top
Where do most log files reside on a Linux system? - Answers -/var/log
Which of the following are package management commands for distributions with
software distributed in files ending in .rpm? (choose three) - Answers -yumex
yum
rpm
You have created a new local network in one of the floors of tour office. All networking
devices and computers are physically connected to one another through cables. How
will you verify the logical connectivity among them? - Answers -Executing the ping
command
How many bits does an IPv4 address have? - Answers -32
Which of the following number formats is used to represent an IPv6 address? -
Answers -Hexadecimal
Which of the following options is used to uniquely identify a device over a network? -
Answers -IP address
What term refers to the worldwide system of servers that translates between IP
addresses and hostnames? - Answers -DNS
Which of the following numbers denotes the root user? - Answers -0
What is the effect of the following command, assuming it completes successfully?
$ groupadd ccbc - Answers -It creates a new group called ccbc
Which of the following commands is used to switch from one user login to another in a
Linux computer? - Answers -su
Which of the following statements is included is a case statement to denote the end of a
case statement? - Answers -esac
What key(s) will enable insert mode in "vi" editor? - Answers -"i" key
What key will you use to delete a line in "vi" editor? - Answers -"dd"
what key will you use to delete a line in "vi" editor? - Answers -"dd"
After using a text editor to create a shell script, what step should you take before typing
to use the script by typing its name? - Answers -Set one or more executable bits using
chmod
Which of the following entries is maintained at the first line of the bash script? -
Answers -#!/bin/bash
Which of the following extensions is used at the end of the script name? - Answers -.sh
What is the effect of the following short script, ex1, if it's called as ex1 big.c big.cc?
#!/bin/bash
cp $2 $1 - Answers -it copies the contents of big.cc to big.c, eliminating the old big.c
Given the following script that is run through ./test.sh hello goodbye :
if [ -f $2 ]; then echo "I am here" fi - Answers -if a file called "goodbye" exists in the
current directory the script will always print "I am here"
True or False; Valid looping statements in Bash include for, while and if-elseif-fi. -
Answers -False
True or False: A user types myscript laser.txt to run a script called myscript. within
myscript, the $0 variable holds the value laser.txt - Answers -False
Which of the following is a physical arrangement in a computer that contains the
computer's basic hardware and components? - Answers -Motherboard
Which of the following is the valid device file name for the first IDE hard drive on the
system? - Answers -/dev/hda
Which of the following are valid partitioning types (choose two) - Answers -MBR
GPT
Choose all of the following statements that are true in regard to virtual RAM (choose
three) - Answers -Virtual RAM is used when available physical RAM is low.
, Virtual RAM is stored on a hard drive.
Virtual RAM is also called swap space.
What command is used to display all hard drive partitions? - Answers -fdisk -l
Which of the following tools is best suited to installing a software package and all of its
dependencies on a Debian computer? - Answers -apt-get
What is the usual name of the first process that the Linux kernel runs, aside from itself?
- Answers -init
Which of the following tools can you use to identify running processes? (choose two) -
Answers -ps
top
Where do most log files reside on a Linux system? - Answers -/var/log
Which of the following are package management commands for distributions with
software distributed in files ending in .rpm? (choose three) - Answers -yumex
yum
rpm
You have created a new local network in one of the floors of tour office. All networking
devices and computers are physically connected to one another through cables. How
will you verify the logical connectivity among them? - Answers -Executing the ping
command
How many bits does an IPv4 address have? - Answers -32
Which of the following number formats is used to represent an IPv6 address? -
Answers -Hexadecimal
Which of the following options is used to uniquely identify a device over a network? -
Answers -IP address
What term refers to the worldwide system of servers that translates between IP
addresses and hostnames? - Answers -DNS
Which of the following numbers denotes the root user? - Answers -0
What is the effect of the following command, assuming it completes successfully?
$ groupadd ccbc - Answers -It creates a new group called ccbc
Which of the following commands is used to switch from one user login to another in a
Linux computer? - Answers -su