Module 4 Flashcards
What command was given to change the permission to the file below? (Select two)
[before] -rw-rw-r–. 1 user1 user1 5494 Oct 11 14:20 file1
[after] -rwxr-xr–. 1 user1 user1 5494 Oct 11 14:20 file1
- chmod 664 file1
- chmod 754 file1
- chmod u+x,g+x-w file1
- chmod u=rwx,g=rx,o=x file1
- chmod 754 file1
- chmod u+x,g+x-w file1
cp command will fail if you try to copy a directory unless you specify the -r option.
- True
- False
True
Which command is used to find the directories under user1’s home directory?
- find ~user1 -name directories
- find directories ~user1
- find -type d ~user1
- find ~user1 -type d
find ~user1 -type d
Directories have inodes, but they do not have their own data blocks.
- True
- False
False
What can other members do to the directory “Heros”?
drwxr-xr–. 2 user1 user1 4096 Oct 2 13:32 Heros
- List the content of the directory
- Add or remove files to and from the directory
- Enter the directory
- Nothing
Nothing
What can the group members do to the directory “Heros”? (Select two)
drwxr-xr–. 2 user1 4096 Oct 2 13:32 Heros
- List the content of the directory
- Add or remove files to and from the directory
- Enter the directory
- Nothing
List the content of the directory
Enter the directory
Which one describes a hard link?
- A separate data block exists for a hard link
- The target file can be on a different partition
- Share the inode of the target file
- Deleting the target file will make the linked file dysfunctional
Share the inode of the target file
Find the match.
- /etc
- /var
- /dev
- /usr/bin
/etc configuration files
/var log files and spool
/dev device files
/usr/bin Linux commands used by all users
Which command is used to find the location of a file? (Select three)
- find
- locate
- which
- where
find
locate
which
What can user1 do to “file1”? (Select two)
-rw-r—x. 1 user1 user1 5494 Oct 2 12:57 file1
- Open and read the content of the file
- Open, read, and edit the content of the file
- Execute the file
- Nothing
Open and read the content of the file
Open, read, and edit the content of the file
When applied to a directory, the SGID special permission____________________.
- causes all new files created in the directory to have the same group
- membership as the directory and not the entity that created them.
- cannot be used, because it is applied only to files.
- allows users the ability to use more than two groups for files that they create within the directory.
- causes users to have their permissions checked before they are allowed to access files in the directory.
causes all new files created in the directory to have the same group
membership as the directory and not the entity that created them
You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate?
- Special permissions have been set on the file.
- The file has one or more files on the filesystem that are hard linked to it.
- The sticky bit directory permission has been set on the file, and will remain inactive as a result.
- Additional entries exist within the ACL of the file that can be viewed using the getfacl command.
Additional entries exist within the ACL of the file that can be viewed using the getfacl command.
Which of the following commands will change the user ownership and group ownership of file1 to user1 and root, respectively?
- chown user1:root file1
- chown user1 : root file1
- This cannot be done because user and group ownership properties of a file must be modified separately.
- chown root:user1 file1
- chown root : user1 file1
chown user1:root file1
When you change the data in a file that is hard-linked to three others, __________.
- only the data in the file you modified is affected
- only the data in the file you modified and any hard linked files in the same directory are affected
- the data in the file you modified and the data in all hard linked files are modified because they have different inodes
- 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 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
Which command do you use to rename files and directories?
- cp
- mv
- rn
- rename
mv