Ndg linux essentials chapter 11 exam

Содержание
  1. NDG Linux Essentials 2.0 Final Exam (Chapter 9-18) Answers
  2. NDG Linux Essentials 2.0 Final Exam (Chapter 9-18) Answers
  3. Which of the following are traits of a multiuser operating system?
  4. (choose three)
  5. A pipe allows you to…
  6. Channel 2 is:
  7. The grep command…
  8. Which of the following commands can be used to scroll through a text file?
  9. (choose two)
  10. Which command can be used to print line numbers?
  11. Which are appropriate editors for writing shell scripts?
  12. (choose two)
  13. Which of the following are correct about for and while loops?
  14. (choose two)
  15. What is the correct way to assign the word “Hello” to a variable?
  16. What is the correct way to save the current directory to a variable?
  17. What is the meaning of $(( $i + 1)) ?
  18. Which of the following are valid CPU types for Intel-based platforms?
  19. (choose two)
  20. Choose all of the following statements that are true in regard to virtual RAM:
  21. (choose three)
  22. A division of a hard drive may be referred to as a _______ .
  23. The fdisk command is a tool used for working with the MBR partitioned disks.
  24. True or False?
  25. Which of the following commands will display CPU information?
  26. (choose two)
  27. The Process ID (PID) of the init process is:
  28. What directory typically contains log files?
  29. The /var directory has files that change over time.
  30. True or False?
  31. Which of the following commands will allow you to view all processes on the system?
  32. (choose two)
  33. Which directory is the root of the filesystem?
  34. A service is…
  35. Only servers have hostnames.
  36. True or False?
  37. Which of the following are valid IPv4 addresses?
  38. (choose two)
  39. Which of the following commands will allow you to log into a remote machine?
  40. Which files contain user account information?
  41. (choose two)
  42. Which command will display the UID, GID and groups your current user belongs to?
  43. Each user belongs to at least one group.
  44. True or False?
  45. Which command will display the users that are currently logged in to the system?
  46. Which command will display the groups that the root user belongs to?
  47. UIDs 1-499 are usually reserved for what kind of users?
  48. Which of the following options for the useradd command allows root to specify the UID to be associated with the account?
  49. Which command can be used to determine a user’s most recent log in?
  50. Which of the following files contains encrypted user password information?
  51. Which of the following options for the useradd command allows you to use a different primary group then the default?
  52. Which of the following commands can be used to modify a user?
  53. Which of the following are methods for setting permissions using the chmod command?
  54. (choose two)
  55. The chown command can be used to change the owner and group of a file.
  56. True or False?
  57. The chmod command can be used on a file by:
  58. The “execute” permission is never set on files by default.
  59. True or False?
  60. The “sticky bit” permission…
  61. The “setuid” permission…
  62. The “setgid” permission…
  63. (choose two)
  64. NDG Linux Essentials 2.0 Chapter 11 Exam Online
  65. Results
  66. Categories
  67. What does this shell script do?
  68. Given the following part of a script:
  69. What is the meaning of $1?
  70. NDG Linux Essentials 2.0 Chapter 11 Exam Online
  71. Results
  72. Categories
  73. What does this shell script do?
  74. Given the following part of a script:
  75. What is the meaning of $1?

NDG Linux Essentials 2.0 Final Exam (Chapter 9-18) Answers

NDG Linux Essentials 2.0 Final Exam (Chapter 9-18) Answers

Which of the following are traits of a multiuser operating system?

(choose three)

  • Resources are shared between users
  • Users can protect their information from other users
  • Many users can log in simultaneously with a unique account
  • Each user can only log in once per day
  • An administrative user gets a dedicated CPU
Читайте также:  Precision time protocol linux

A pipe allows you to…

  • …send the same input to multiple commands.
  • …type multiple commands at one prompt.
  • …send the output of one command to another.
  • …send the output of a command to a file.

Channel 2 is:

The grep command…

  • …will display all the lines that begin with the specified Regular Expression.
  • …will display all the lines in a file containing the specified Regular Expression.
  • …is not case sensitive.
  • …will display the line numbers in a file that contain a specified Regular Expression.

Which of the following commands can be used to scroll through a text file?

(choose two)

Which command can be used to print line numbers?

Which are appropriate editors for writing shell scripts?

(choose two)

Which of the following are correct about for and while loops?

(choose two)

  • while loops operate over a fixed list of items
  • for loops have a test each cycle to determine if it should run again
  • while loops have a test each cycle to determine if it should run again
  • for loops operate over a fixed list of items
  • for loops require a variable over which to iterate

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?

What is the meaning of $(( $i + 1)) ?

  • If i is 0, the loop will stop
  • This runs the command stored in variable i
  • This will return the value of the next argument to the script
  • 1 will be added to the i variable
  • This will return the value of the first argument to the script

Which of the following are valid CPU types for Intel-based platforms?

(choose two)

Choose all of the following statements that are true in regard to virtual RAM:

(choose three)

  • Virtual RAM is stored in the CPU
  • Virtual RAM is also called swap space
  • Virtual RAM is stored on a hard drive
  • Virtual RAM is used when available physical RAM is low.

A division of a hard drive may be referred to as a _______ .

The fdisk command is a tool used for working with the MBR partitioned disks.

True or False?

Which of the following commands will display CPU information?

(choose two)

The Process ID (PID) of the init process is:

What directory typically contains log files?

The /var directory has files that change over time.

True or False?

Which of the following commands will allow you to view all processes on the system?

(choose two)

Which directory is the root of the filesystem?

A service is…

  • …another name for a computer’s hostname.
  • …a file that contains configuration information.
  • …like an IP address.
  • …a feature provided by one computer to another.

Only servers have hostnames.

True or False?

Which of the following are valid IPv4 addresses?

(choose two)

Which of the following commands will allow you to log into a remote machine?

Which files contain user account information?

(choose two)

Which command will display the UID, GID and groups your current user belongs to?

Each user belongs to at least one group.

True or False?

Which command will display the users that are currently logged in to the system?

Which command will display the groups that the root user belongs to?

UIDs 1-499 are usually reserved for what kind of users?

  • Are not used for user accounts, but for group accounts
  • Log-in (human) users
  • Remote log-in accounts
  • System accounts, such as server processes

Which of the following options for the useradd command allows root to specify the UID to be associated with the account?

Which command can be used to determine a user’s most recent log in?

Which of the following files contains encrypted user password information?

Which of the following options for the useradd command allows you to use a different primary group then the default?

Which of the following commands can be used to modify a user?

Which of the following are methods for setting permissions using the chmod command?

(choose two)

The chown command can be used to change the owner and group of a file.

True or False?

The chmod command can be used on a file by:

  • The file owner and root
  • The file owner
  • Only root
  • A user that belongs to the files current group
Читайте также:  Asus sbw 06d2x u linux

The “execute” permission is never set on files by default.

True or False?

The “sticky bit” permission…

  • …changes the group ownership of existing files in a directory.
  • …prevents others from removing files they don’t own from a common directory.
  • …sets the group ownership of any new file created in a directory.
  • …prevents others from overwriting files they don’t own in common directories.

The “setuid” permission…

  • …prevents the owner of a file from being changed.
  • …reports the output of a script to the owner.
  • …allows a command to be run as the file owner.
  • …allows files in a directory to be manipulated as by the directory owner.

The “setgid” permission…

(choose two)

  • …prevents the group owner of a file from being changed.
  • …allows files created in a directory to be owned by the group that owns the directory.
  • …allows a command to be run as the group owner of the file.
  • …can only be set on files.

Источник

NDG Linux Essentials 2.0 Chapter 11 Exam Online

You have already completed the quiz before. Hence you can not start it again.

You must sign in or sign up to start the quiz.

You have to finish following quiz, to start this quiz:

Results

0 of 18 questions answered correctly

You have reached 0 of 0 points, ( 0 )

Categories

1 . Question
  • This is a Perl script
  • The operator should not be using /bin/csh
  • C Shell compatibility mode is enabled
  • Running the script will invoke /bin/csh to interpret the rest of the file
  • Nothing, this is a comment
2 . Question
3 . Question
  • Mouse clicks
  • Escape followed by another character
  • Control and another character
  • The F1 through F12 function keys
  • Alt and another character
4 . Question

What does this shell script do?

FOO=/tmp/foo if [ ! –d $FOO ]; then mkdir $FOO fi
  • Creates /tmp/foo if it does not exist
  • Outputs a message to the screen
  • Creates /tmp/foo and raises an error if there is a problem
  • Nothing, since there is a problem with the conditions in the if statement
  • Makes the /tmp/foo directory if a file by that name exists
5 . Question

Which of the following are correct about for and while loops?
(choose two)

  • for loops have a test each cycle to determine if it should run again
  • for loops operate over a fixed list of items
  • for loops require a variable over which to iterate
  • while loops operate over a fixed list of items
  • while loops have a test each cycle to determine if it should run again
6 . Question

Given the following part of a script:

if [ -f $1 ]; then echo “I am here” fi

What is the meaning of $1?

  • It is a parameter to -f, indicating the size of the file
  • It is the first argument passed to the script
  • It is a special variable that indicates the exit code of the command before it
  • It is a file called $1
  • It is a list of files that gets interpolated
7 . Question
if [ -f $2 ]; then echo "I am here" fi
  • If a file called «goodbye» exists in the current directory
  • Never
  • The script will always print “I am here”
  • If there are two files in the current directory
  • If a file called «hello» exists in the current directory
8 . Question
9 . Question
10 . Question
11 . Question
  • The name of the command run
  • The previous command’s exit code
  • The number of arguments passed to the script
  • The current process id
  • The current user ID
Читайте также:  Linux mint or kali linux
12 . Question
13 . Question
14 . Question

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
  • test –f USERS=5
  • test $USERS = 5
  • test $USERS,5
  • test $USERS –a 5
15 . Question
while [ ! –f /tmp/foo ]; do echo –n “.” process_data > /tmp/foo done
  • The screen will fill with dots.
  • If a file called /tmp/foo exists, process_data won’t be run
  • process_data will be called at most once
  • process_data will never be run
  • /tmp/foo will be removed if it exists

Источник

NDG Linux Essentials 2.0 Chapter 11 Exam Online

You have already completed the quiz before. Hence you can not start it again.

You must sign in or sign up to start the quiz.

You have to finish following quiz, to start this quiz:

Results

0 of 18 questions answered correctly

You have reached 0 of 0 points, ( 0 )

Categories

1 . Question
  • This is a Perl script
  • The operator should not be using /bin/csh
  • C Shell compatibility mode is enabled
  • Running the script will invoke /bin/csh to interpret the rest of the file
  • Nothing, this is a comment
2 . Question
3 . Question
  • Mouse clicks
  • Escape followed by another character
  • Control and another character
  • The F1 through F12 function keys
  • Alt and another character
4 . Question

What does this shell script do?

FOO=/tmp/foo if [ ! –d $FOO ]; then mkdir $FOO fi
  • Creates /tmp/foo if it does not exist
  • Outputs a message to the screen
  • Creates /tmp/foo and raises an error if there is a problem
  • Nothing, since there is a problem with the conditions in the if statement
  • Makes the /tmp/foo directory if a file by that name exists
5 . Question

Which of the following are correct about for and while loops?
(choose two)

  • for loops have a test each cycle to determine if it should run again
  • for loops operate over a fixed list of items
  • for loops require a variable over which to iterate
  • while loops operate over a fixed list of items
  • while loops have a test each cycle to determine if it should run again
6 . Question

Given the following part of a script:

if [ -f $1 ]; then echo “I am here” fi

What is the meaning of $1?

  • It is a parameter to -f, indicating the size of the file
  • It is the first argument passed to the script
  • It is a special variable that indicates the exit code of the command before it
  • It is a file called $1
  • It is a list of files that gets interpolated
7 . Question
if [ -f $2 ]; then echo "I am here" fi
  • If a file called «goodbye» exists in the current directory
  • Never
  • The script will always print “I am here”
  • If there are two files in the current directory
  • If a file called «hello» exists in the current directory
8 . Question
9 . Question
10 . Question
11 . Question
  • The name of the command run
  • The previous command’s exit code
  • The number of arguments passed to the script
  • The current process id
  • The current user ID
12 . Question
13 . Question
14 . Question

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
  • test –f USERS=5
  • test $USERS = 5
  • test $USERS,5
  • test $USERS –a 5
15 . Question
while [ ! –f /tmp/foo ]; do echo –n “.” process_data > /tmp/foo done
  • The screen will fill with dots.
  • If a file called /tmp/foo exists, process_data won’t be run
  • process_data will be called at most once
  • process_data will never be run
  • /tmp/foo will be removed if it exists

Источник

Оцените статью
Adblock
detector