DCOM Final questions with 100% correct answers graded A+ 2023/2024
DCOM FinalThe number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in? a) test $USERS = 5 b) test $USERS -a 5 c) test -f $USERS=5 d) test $USERS -eq 5 - correct answer d) 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? (choose two) a) The screen will fill with dots b) /tmp/foo will be removed if it exists c) process_data will never be run d) If a file called /tmp/foo exists, process_data won't be run e) process_data will be called at most once - correct answer d) If a file called /tmp/foo exists, process_data won't be run e) process_data will be called at most once A conditional that lets you make multiple comparisons with a pattern is called: a) fanout b) if c) branch d) case e) test - correct answer d) case What is the meaning of $(( $i + 1)) ? a) If i is 0, the loop will stop b) This will return the value of the first argument to the script c) 1 will be added to the i variable d) This runs the command stored in variable i e) This will return the value of the next argument to the script - correct answer c) 1 will be aded to the i variable How would you write a test that says "if /tmp/foo is a directory or USERS is greater than 5" ? a) test -d /tmp/foo | $USERS > 5 b) test /tmp/foo -d -o $USERS -gt 5 c) test /tmp/foo || $USERS > 5 d) test -d /tmp/foo -o $USERS -gt 5 e) test -f /tmp/foo -o $USERS -ge 5 - correct answer d) test -d /tmp/foo -o $USERS -gt 5 A division of a hard drive may be referred to as a (choose two) a) partition b) label c) slice d) block - correct answer a) partition b) slice Which of the following are valid partitioning types? (choose two)
Written for
- Institution
- Dcom
- Course
- Dcom
Document information
- Uploaded on
- November 10, 2023
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal