CompTIA Linux+ Guide to Linux Certification 4th Edition Chapter 4
*What was created to define a standard directory structure and common file location for linux? A. FHS B. FSH C. root directory D. X.500
A. FHS
*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? A. User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file. B. Members of the root group have read and write, user1 has read and execute, and all others have read permissions to the file. C. All users have read and write, members of the root group have read and execute, and user1 has read permissions to the file. D. User1 has read and write, all others have read and execute, and members of the root group have read permissions to the file.
A. User1 has read and write permissions, members of the root group have read and execute permissions, and all others have read permissions on the file
*Which command do you use to rename files and directories? A. mv B. cp C. rn D. rename
A. mv
*Which of the following commands will change the user ownership and group ownership of file1 to user1 and root respectively? A. chown user1 : root file1 B. This cannot be done because user and group ownership properties of a file must be modified separately. C. chown user1:root file1 D. chown root:user1file1
C. chown user1:root file1
*When applied to a directory, the SGID special permission _________. A. causes users to have their permissions checked before they are allowed to access files in the directory B. allows users the ability to use more than two groups for files that they create within the directory C. cannot be done as it is only applied to files D. causes all new files created in the directory to have the same group membership as the directory and not the entity that created them
D. Causes all new files created in the directory to have the same group membership as the directory and not the entity that created them
*A file has the following permissions: r----x-w-. The command chmod 143 would have the same effect as the command ________. A. Chmod u+x-r,g+r-x,o+w file1 B. Chmod u=w,g=rw,o=rx file1 C. Chmod u-r-w,g+r-w,o+r-x file1 D. Chmod u=x,g=r,o=wx file1
D. chmod u=x, g=r, o=wx file1
*A symbolic link is also known as a soft link and is depicted by an @ symbol appearing at the beginning of the filename when viewed using the ls -l command. True or false?
False
*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?
True
*What does the /var directory contain? A. spools and log files B. various additional programs C. temporary files D. files that are architecture independent
A. spools and log files
*The which command _______________. A. can only be used to search for executables B. searches for a file in all directories, starting from the root C. is not a valid Linux command D. searches for a file only in directories that are in the PATH variable
D. searches for a file only in directories that are in the PATH variable
*You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate? a. additional entries exist within the ACL of the file that can be viewed using the getfaci command b. the sticky bit directory permission has been set on the file, and will remain inactive as a result c. special permissions have been set on the file d. the file has one or more files on the filesystem that are hard linked to it
a. additional entries exist within the ACL of the file that can be viewed using the getfaci command
*What are the three standard Linux permissions? A. full control, read-execute, write B. execute, read, write C. read, write, examine D. read, write, modify
B. Execute, read, write
*What must a user do to run cp or mv interactively and be asked if she wants to overwrite an existing file? A. Type cp -i or mv-i B. Just type cp or mv as they run in interactive mode by default C. There is no choice as the new file will overwrite the old one by default. D. Type cp -interactive or mv - interactive
B. Just type cp or mv, because they run in interactive mode by default
*When you change the data in a file that is hard-linked to three others, _________. A. Only the data in the file you modified and any hard linked files in the same directory are affected. B. The data in the file you modified as well as the data in all hard linked files are modified as they share the same data and all have the same inode and file size. C. Only the data in the file you modified is affected. D. The data in the file you modified and the data in all hard linked files are modified as they have different inodes.
B. The data in the file you modified as well as the data in all hard-linked files are modified, because they share the same data and all have the same inode and file size.
*The default permissions given by the system prior to analyzing the umask are ________ for directories and ________ for files. A. rw-rw-rw- and r--r--r-- B. rwxrwxrwx and rw-rw-rw- C. rw-rw-rw- and rw-rw-rw- D. rw-rw-rw- and rwxrwxrwx
B. rwxrwxrwx and rw-rw-rw-
*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? A. Rw-rw-rw- B. Rwxrw-r-- C. ---r--rw- D. ----wx--x
C. ---r--rw-
*What does the mv command do? (Choose all that apply.) a. It makes a volume. b. It makes a directory. c. It moves a directory. d. It moves a file.
C. It moves a directory and D. It moves a file
*The command chmod 317 file1 would produce which of the following lines in the ls command? A. --w-r--rwx 1 user1 root 0 Apr 29 15:40 file1 B. -rwxrw-r-x 1 user1 root 0 Apr 29 15:40 file1 C. --w-rw-r-e 1 user1 root 0 Apr 29 15:40 file1 D. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1
D. --wx--xrwx 1 user1 root 0 apr 29 15:40 file1
*The root user utilizes the chgrp command to give ownership of a file to another user. What must the root user do to regain ownership of the file? A. Run chown and list the root user as the new owner. B. Have the new owner run chgrp and list the root user as the new owner. C. Nothing as this is a one-way, one-time action. D. Run chgrp again listing the root user as the new owner.
D. Run chgrp again listing the root user as the new owner.
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?
False
20. 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 a. one b. two c. three d. four
Really no clue whatsoever