DCOM 142 Final Exam Questions With Verified Answers
Which of the following statements is included is a case statement to denote the end of a case statement? - Answer esac What key(s) will enable insert mode in "vi" editor? - Answer "i" key What key will you use to delete a line in "vi" editor? - Answer "dd" what key will you use to delete a line in "vi" editor? - Answer "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? - Answer Set one or more executable bits using chmod - Answer Which of the following entries is maintained at the first line of the bash script? - Answer #!/bin/bash Which of the following extensions is used at the end of the script name? - Answer .sh What is the effect of the following short script, ex1, if it's called as ex1 big.c ? #!/bin/bash cp $2 $1 - Answer it copies the contents of to big.c, eliminating the old big.c Given the following script that is run through ./ hello goodbye : if [ -f $2 ]; then echo "I am here" fi - Answer 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. - Answer False True or False: A user types myscript to run a script called myscript. within myscript, the $0 variable holds the value - Answer False Which of the following is a physical arrangement in a computer that contains the computer's basic hardware and components? - Answer Motherboard Which of the following is the valid device file name for the first IDE hard drive on the system? - Answer /dev/hda Which of the following are valid partitioning types (choose two) - Answer MBR GPT Choose all of the following statements that are true in regard to virtual RAM (choose three) - Answer 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? - Answer fdisk -l
Document information
- Uploaded on
- November 8, 2023
- Number of pages
- 6
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers