- 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)
- A pipe allows you to…
- Channel 2 is:
- The grep command…
- 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)
- 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)) ?
- 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)
- 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…
- 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?
- 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 “execute” permission is never set on files by default.
- True or False?
- The “sticky bit” permission…
- The “setuid” permission…
- The “setgid” permission…
- (choose two)
- NDG Linux Essentials 2.0 Chapter 11 Exam Online
- Results
- Categories
- What does this shell script do?
- Given the following part of a script:
- What is the meaning of $1?
- NDG Linux Essentials 2.0 Chapter 11 Exam Online
- Results
- Categories
- What does this shell script do?
- Given the following part of a script:
- 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
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
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
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