NDG Linux Essentials Chapter 9 and 10
Terms in this set (31)
The echo command is:
used to output text to the console
A file begins with #!/bin/csh. This means:
Running the script will invoke /bin/csh to interpret the rest of the file.
Which are appropriate editors for writing shell scripts?
vi and nano
Most of nano's commands take the form of:
Control and another character
What does this shell script do? FOO=/tmp/foo if [! -d $FOO ]; then mkdir $FOO fi
Creates /tmp/foo if it does not exist
Which of the following are correct about for and while loops?
for loops operate over a fixed list of items and while loops have a test each cycle to determine if it should run again.
Given the following part of a script: if [ -f $1 ]; then echo "I am here" fi
It is a special variable that indicates the exit code of the command before it.
Given the following script that is run through .test.sh hello goodbye if [ -f $2 ]; then echo "I am here" fi
If a file called "goodbye" exists in the current directory.
What is the correct way to assign the word "Hello" to a variable?
What is the correct way to save the current directory to a variable?
Which shell command accepts input from the user's keyboard?
What information is held inside $? ?
The previous command's exit code
How would you finish your script with an exit code of 42?
The if command looks for what exit code to consider a condition to be true?
The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in?
test $USERS -eq 5
Given the following script: while [ ! -f /tmp/foo]; do echo -n "." process_data > /tmp/foo done Which of the following are true?
If a file called /tmp/foo exists, process_data won't be run and process_data will be called at most once
A conditional that lets you make multiple comparisons with a pattern is called:
What is the meaning of $(( $i + 1)) ?
1 will be added to the i variable
How would you write a test that says "if /tmp/foo is a directory or USERS is greater than 5"?
test -d /tmp/foo -o $USERS -gt 5
Which of the following are valid CPU types for intel-based platforms?
64-bit and 32-bit
64-bit platforms can access more memory than 32-bit platforms, true or false?
Which of the following commands will display CPU information?
lscpu, arch, and cat /proc/cpuinfo
A CPU flag...?
Defines the features that the CPU supports.
Which command displays information from SMBIOS?
Choose all of the following statements that are true in regards to virtual RAM.
Used when available physical RAM is low, is also called swap space, and is stored on a hard drive.
Which of the following are common busing systems?
USB and PCI
A division of a hard drive may be referred to as a
Slice or partition
Which of the following are valid partitioning types?
MBR and GPT
The fdisk command is a tool used for working with the MBR partitioned disks, true or false?
Which of the following is the valid device file name for the first IDE hard drive on the system?
Which of the following are valid video cable connector types?
DVI and VGA
YOU MIGHT ALSO LIKE...
Linux Chapter 9
Chapter 9 Quiz Linux
Linux Chapter 9
NDG Linux Essentials - Final Ch 9-16
OTHER SETS BY THIS CREATOR
CCNA2 Chapter 9 Test
CCNA2 Chapter 11 (NAT)
CCNA2 Chapter 7 Exam
Cisco Chapter 6 Study Guide
THIS SET IS OFTEN IN FOLDERS WITH...
Linux Essentials Chapter 4 Exam
Linux Chapter 8