ch 4 quiz
The contents of a certain variable in memory can be viewed using which metacharacter below in combination with the echo command?
$
In a file's mode, a permission that is unavailable is represented by what character?
-
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?
---r--rw-
The command chmod 317 file1 would produce which of the following lines in the ls command?
--wx--xrwx 1 user1 root 0 Apr 29 15:40 file1
You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate?
Additional entries exist within the ACL of the file that can be viewed using the getfacl command.
What two commands below can be used to locate files on a filesystem?
a. locate c. find
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
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.)
chmod u=x,g=r,o=wx file1
Which of the following commands will change the user ownership and group ownership of file1 to user1 and root respectively?
chown user1:root file1
What command can be used to copy files?
cp
What are the three standard Linux permissions?
execute, read, write
Only the root user can modify a file that has the immutable attribute set. True or False?
false
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
In order to create a hard link, what command must be used?
ln
Select the command below that utilizes a premade database that contains a list of all the files on a system:
locate
Which command do you use to rename files and directories?
mv
What command below takes a list of arguments specifying the absolute or relative pathnames of files to remove?
rm
The default permissions given by the system prior to analyzing the umask are ___________for directories, and __________ for files.
rwxrwxrwx and rw-rw-rw-
The which command _________________?
searches for a file only in directories that are in the PATH variable
The section of an inode that stores permissions is referred to as what?
the mode of the file
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
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
two
What permission (when assigned to a file) grants a user the ability to open, read, and edit the contents of a file?
write
What permission grants a user the ability to open, read, and edit the contents of a file?
write
What does the setfacl -b command do?
It removes all extra ACL assignments on a given file
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 as they share the same data and all have the same inode and file size.
The SGID allows regular users to execute a binary compiled program and become a member of the group that is attached to the file.
True
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?
User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.
What does the mv command do? (Choose all that apply.)
It moves a directory. It moves a file.
What must a user do to run cp or mv interactively and be asked if she wants to overwrite an existing file?
Just type cp or mv as they run in interactive mode by default.
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?
Run chgrp again listing the root user as the new owner.
What was created to define a standard directory structure and common file location for Linux?
FHS
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?
False
Shell scripts do not require the execute permission in order to be run the same way binary programs are run.
False