Linux+ Networking Chapter 5

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Ajeff
A
Ajeff
Community Contributor
Quizzes Created: 39 | Total Attempts: 59,872
| Attempts: 1,083 | Questions: 19
Please wait...
Question 1 / 19
0 %
0/100
Score 0/100
1. Hard links need to reside on the same filesystem as the target, whereas symbolic links need not be on the same filesystem as the target. True or False?

Explanation

Hard links are file system links that point directly to the target file. They are essentially the same file with multiple names. Hard links must reside on the same file system as the target because they reference the target's physical location on the disk. On the other hand, symbolic links are file system links that point to the target file by its path. Symbolic links can be created on different file systems as they do not reference the target's physical location. Therefore, the statement "Hard links need to reside on the same filesystem as the target, whereas symbolic links need not be on the same filesystem as the target" is true.

Submit
Please wait...
About This Quiz
Linux Plus Networking Quizzes & Trivia

This quiz assesses knowledge on Linux networking, focusing on symbolic links, permissions, file ownership, and command functionalities.

2. What are the three standard Linux permissions?

Explanation

The three standard Linux permissions are execute, read, and write. These permissions determine the level of access a user has to a file or directory. The execute permission allows a user to run a file or access a directory. The read permission allows a user to view the contents of a file or directory. The write permission allows a user to modify or delete a file or directory.

Submit
3. There is no real difference between the “S” and “s” special permissions when displayed using the ls –l command. One just means it is on a file and the other that it is on a directory. True or False?

Explanation

False. The "S" and "s" special permissions do have a difference when displayed using the ls -l command. The lowercase "s" indicates that the setgid permission is set on a directory, while the uppercase "S" indicates that the setgid permission is not set on a file, but the execute permission is set.

Submit
4. The command chmod 317 file1 would produce which of the following lines in the ls command?

Explanation

not-available-via-ai

Submit
5. After typing the ls –F command, you see the following line in the output:  -rw-r-xr--    1 user1    root        0 Apr 29 15:40 file1  What does this mean?

Explanation

The output line "-rw-r-xr-- 1 user1 root 0 Apr 29 15:40 file1" represents the file permissions. The first character "-" indicates that it is a regular file. The next three characters "rw-" indicate that the owner, user1, has read and write permissions. The next three characters "r-x" indicate that the members of the root group have read and execute permissions. The last three characters "r--" indicate that all others have read permissions. Therefore, the correct answer is that user1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.

Submit
6. Which command do you use to rename files and directories?

Explanation

The correct answer is "mv". The "mv" command is used to rename files and directories in a Unix or Linux operating system. By using this command, you can change the name of a file or directory to a new name of your choice. It is a versatile command that can also be used to move files and directories to different locations in the file system.

Submit
7. A symbolic link is also known as a soft link and is depicted by an @ appearing at the beginning of the filename when viewed using the ls –l command. True or False?

Explanation

A symbolic link is also known as a soft link, but it is not depicted by an @ appearing at the beginning of the filename when viewed using the ls –l command.

Submit
8. What does the /var directory contain?

Explanation

The /var directory contains spools and log files. Spools are temporary storage areas where data is held before being processed or printed. Log files record events and activities on the system, providing a history of actions and errors for troubleshooting purposes. These files are typically found in the /var directory to keep them separate from other system files and to allow for easy management and access.

Submit
9. When you change the data in a file that is hard-linked to three others, __________.

Explanation

When you change the data in a file that is hard-linked to three others, the data in the file you modified as well as the data in all hard-linked files are modified. This is because hard links are essentially multiple names for the same file, sharing the same data and inode. Therefore, any changes made to the file will be reflected in all the hard-linked files since they all point to the same underlying data.

Submit
10. What does the mv command do? (Choose all that apply.)

Explanation

The mv command is used to move files or directories from one location to another. It can be used to move both directories and files. Therefore, the correct answers are "It moves a directory" and "It moves a file."

Submit
11. When applied to a directory, the SGID special permission____________________.

Explanation

The SGID special permission, when applied to a directory, ensures that any new files created within that directory will inherit the same group membership as the directory itself. This means that the group ownership of the directory will be applied to the new files, rather than the group ownership of the user who created them. This can be useful in situations where multiple users need to collaborate on files within a shared directory, as it allows for consistent group ownership and access permissions.

Submit
12.
  1. The which command _________________?

Explanation

The "which" command is used to search for the location of a command or executable file in the directories listed in the PATH variable. It does not search for files in all directories starting from the root, nor is it limited to searching for executables only. Therefore, the correct answer is that "which" searches for a file only in directories that are in the PATH variable.

Submit
13. A user utilizes the chgrp command to give ownership of a file to another user. What must the user do to regain ownership of the file?

Explanation

not-available-via-ai

Submit
14. Which of the following commands will change the user ownership and group ownership of file1 to user1 and root respectively?

Explanation

The correct answer is "chown user1:root file1". This command will change the user ownership of "file1" to "user1" and the group ownership to "root".

Submit
15. The default permissions given by the system prior to analyzing the umask are ___________for directories, and __________ for files.

Explanation

The default permissions given by the system prior to analyzing the umask are "rwxrwxrwx" for directories and "rw-rw-rw-" for files.

Submit
16. Given the following output from the ls command, how many files are linked with file1? drwxr-xr-x    3 root     root         4096 Apr  8 07:12 Desktop -rw-r--r--    3 root     root          282 Apr 29 22:06 file1 -rw-r--r--    1 root     root          282 Apr 29 22:06 file2 -rw-r--r--    4 root     root          282 Apr 29 22:06 file3 -rw-r--r--    2 root     root          282 Apr 29 22:06 file4 -rw-r--r--    1 root     root          282 Apr 29 22:06 file5 -rw-r--r--    1 user1    sys           282 Apr 29 22:06 file6

Explanation

Two files are linked with file1. This can be determined by looking at the output of the ls command. The lines that start with "drwxr-xr-x" and "rw-r--r--" are not relevant to the question as they represent directories and permissions. The lines that start with "rw-r--r--" and have "root" as the owner are the files. In this case, file1 and file2 are the only files that meet this criteria. Therefore, the answer is two.

Submit
17. A file has the following permissions r----x-w-. The command chmod 143 would have the same effect as the command  _______________. (Choose all that apply.)

Explanation

The given file has the permissions r----x-w-. The command chmod 143 would have the same effect as the command chmod u=x,g=r,o=wx file1 because it sets the permissions for the user to execute, for the group to read, and for others to write and execute.

Submit
18. After typing the command umask 731, the permissions on all subsequently created files and directories will be effected. In this case, what will the permissions on all new files be?

Explanation

After typing the command umask 731, the umask value will be applied to the default permissions of all subsequently created files and directories. The umask value is subtracted from the default permissions to determine the final permissions. In this case, the umask value is 731, which means that the permissions for the group and others will be affected. The default permissions are rw-rw-rw-, and subtracting 731 from it results in ---r--rw-. Therefore, the permissions on all new files will be ---r--rw-.

Submit
19. What must a user do to run cp or mv interactively and be asked if she wants to overwrite an existing file?

Explanation

The correct answer is "Just type cp or mv as they run in interactive mode by default." This means that when the user runs the cp or mv command, they will be prompted to confirm if they want to overwrite an existing file.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 16, 2009
    Quiz Created by
    Ajeff
Cancel
  • All
    All (19)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Hard links need to reside on the same filesystem as the target,...
What are the three standard Linux permissions?
There is no real difference between the “S” and “s” special...
The command chmod 317 file1 would produce which of the following lines...
After typing the ls –F command, you see the following line in the...
Which command do you use to rename files and directories?
A symbolic link is also known as a soft link and is depicted by an @...
What does the /var directory contain?
When you change the data in a file that is hard-linked to three...
What does the mv command do? (Choose all that apply.)
When applied to a directory, the SGID special...
The which command _________________?
A user utilizes the chgrp command to give ownership of a file to...
Which of the following commands will change the user ownership and...
The default permissions given by the system prior to analyzing the...
Given the following output from the ls command, how many files are...
A file has the following permissions r----x-w-. The command chmod 143...
After typing the command umask 731, the permissions on all...
What must a user do to run cp or mv interactively and be asked if she...
Alert!

Advertisement