ITN 170 Chapter 4 Quiz

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following group is used for a regular file? w - d l

-

After typing the command umask 731, the permissions on all subsequently created files and directories will be effected. In this case, what will be the permissions on all new files? a. rw-rw-rw- b. rwxrw-r-- c. ---r--rw- d. ----wx--x

---r--rw-

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. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1 c. -rwxrw-r-x 1 user1 root 0 Apr 29 15:40 file1 d. --w-rw-r-e 1 user1 root 0 Apr 29 15:40 file1

--wx--xrwx 1 user1 root 0 Apr 29 15:40 file1

Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.) -r -R --recursive --follow

-R --recursive

Which parameter do you use with the setfacl command to define a default ACL? -a -g -l -d

-d

Which parameter of the df command should you use to check if a partition has been mounted? -l -h -c -d -a

-h

To copy a directory and the files contained in it to another directory, which parameter should be used with the cp command? -a -x -f -r

-r

Which parameter should be used with the rm command to remove a directory? -x -r -f -a

-r

Which parameter is used to create a symbolic link rather than a hard link with the ln command? -x -s -a -r -f

-s

Where is the pwd command located on this system?

/bin

Which of the following two directories contain files that are static and cannot be changed by a user? [Choose two.] /home /boot /etc /var

/boot /etc

Lynn runs the locate command and the results include many files from a directory that she doesn't want to include in her search. Which of the following files could Lynn modify so that the locate command no longer includes those results? a. /etc/locate.d/updatedb.conf b. /etc/locate.conf c. /etc/updatedb.conf d. /etc/locatedb.conf

/etc/updatedb.conf

The Filesystem Hierarchy Standard specifies what directory as the root user's home directory? /bin /home/root /boot /root

/root

What is the complete path and filename for the database that is used by the locate and mlocate commands? /var/lib/mlocate/mlocate.db /var/lib/locate/locate.db /etc/mlocate.db /etc/locate/mlocate.db

/var/lib/mlocate/mlocate.db

Which of the following directories are unshareable? [Choose all that apply.] /etc /home /var/log /var /proc

/var/log /proc

Which of the following umask settings will result in new files receiving the default permissions -rw-------? a. 0177 b. 0600 c. 0188 d. 0688

0177

What is the octal value of execute permission? 0 1 2 4

1

What is the octal value of execute permission? 0 2 1 4

1

What is the default value of SGID? 3 4 1 6 2

2

The inode number of the links file is 267865. What is the inode number of the links2 file?

267865

What is the default value of SUID? 4 3 1 6 2

4

What is the octal value of read permission? 1 0 2 4

4

What is the octal value of SUID? 4000 2000 3000 1000

4000

What is the octal value for the -rw-rw-rw- permission? 444 555 777 666

666

What is the standard permission for files? 777 666 444 555

666

If you create a file on which no one other than root has read, write, or execute permissions, which value should you use with the chmod command? 444 777 477 700 400

700

Jan needs to set permissions on a file so that the owner has read, write, and execute permissions. The group should have read permissions only, and everyone else should have no access. Which of the following parameters, when used with the chmod command, would set the permissions described? 047 740 026 620

740 The permissions are set from left to right for owner, group, and everyone else. Read = 4, Write = 2, and Execute = 1. A 7 in the owner placeholder is equal to 4 + 2 + 1, or Read + Write + Execute. A 4 in the group placeholder means only the read bit is turned on. A 0 in the others placeholder means that none of the permissions are set.

What is the numeric representation of the mode of a newly created directory? In the space provided, enter only the numeric value.

777

What is the standard permission for directories? 444 555 666 777

777

You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate? a. Special permissions have been set on the file. b. The file has one or more files on the filesystem that are hard linked to it. c. The sticky bit directory permission has been set on the file, and will remain inactive as a result. d. 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 special characters are used as wildcards? [Choose all that apply.] ? [] * ~

All of them

In which of the following ways can an access control list be configured? [Choose all that apply.] Per group basis Per-user basis For users other than the ones in the group for a file Using an effective right mask

All the above

We used 765in this lab to set the mode of a file named project2. If we had used the value 675 who would be affected?

Both user and group

What was created to define a standard directory structure and common file location for Linux? a. FSH b. X.500 c. FHS d. root directory

FHS

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? a. True b. False

False

Only the root user can modify a file that has the immutable attribute set. True or False? a. True b. 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? a. True b. False

False

Which type of link can only exist on the local system? Hard link Temp link Symbolic link Soft link

Hard Link

Which type of link is another directory entry for the source file and carries those same properties, such as file permissions, of the source file? Hard link Symbolic link Temp link Soft link

Hard Link

What must a user do to run cp or mv interactively and be asked whether to overwrite an existing file? a. There is no choice as the new file will overwrite the old one by default. b. Type interactive cp or interactive mv. c. Type cp -i or mv-i. d. Type cp -interactive or mv - interactive. e. Just type cp or mv as they run in interactive mode by default.

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? a. Run chgrp again listing the root user as the new owner. b. Nothing, because this is a one-way, one-time action. c. Have the new owner run chgrp, and list the root user as the new owner. d. Run chown and list the root user as the new owner.

Run chgrp again listing the root user as the new owner.

Which of the following is a separate partition that moves items from computer memory to its hard drive? Swap Mount Root Home

Swap

Which type of link is a pointer to the source file? Soft link Temp link Symbolic link Hard link

Symbolic Link

If a hard link is created to a file and then the original file is deleted, which of the following is true? Both the original file and the hard link are removed. An error message will be displayed preventing the deletion of the original file. The original file will be removed while the hard link remains, though the content will not be accessible. The original file will be removed while the hard link remains usable to access the contents of the file.

The original file will be removed while the hard link remains usable to access the contents of the file.

What would be the result of running the command chown :root file1.txt a. This would set the owner of file1.txt to root. b. This would set the group ownership of file1 to root. c. This would set the owner and group ownership of file1 to root. d. This would keep the current ownership of the file, and add root as a second owner of the file.

This would set the group ownership of file1 to root.

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? a. True b. False

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 file1What 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.

User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.

When applied to a directory, the SGID special permission____________________. a. causes all new files created in the directory to have the same group membership as the directory and not the entity that created them b. cannot be used, because it is applied only to files c. allows users the ability to use more than two groups for files that they create within the directory d. 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

In order to set all of the special permissions on a certain file or directory, which command should be used on a file named filename? chmod 777 filename chmod 7777 filename chmod 6666 filename chmod 0000 filename

chmod 7777 filename In the chmod 7777 command, the first three bits represent the SUID(4), SGID(2), and sticky(1) flags.

Which of these commands will set the following permissions on file1.txt? User = Read, Write, Execute Group = Read, Execute Others = Read chmod o=rwx,g=rx,u=r file1.txt chmod u=rwx, g=rx, u=r file1.txt chmod 754 file1.txt chmod file1.txt 754

chmod u=rwx, g=rx, u=r file1.txt chmod 754 file1.txt

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.) 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 e. chmod u+w,g+r-w,o+r-x file1 f. chmod u=rw,g=r,o=r file1

chmod u=x,g=r,o=wx file1

Which command will add the read, write, and execute permissions to Everyone on a file named plab.txt? chmod uo+rwx plab.txt chmod o+rwx plab.txt chmod ugo+rwx plab.txt chmod +rwx plab.txt

chmod ugo+rwx plab.txt

Which commands can be used to change the group in a file permission? [Choose all that apply.] chown chusr chmod chgrp

chown chgrp

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. chown user1 : root file1 c. This cannot be done because user and group ownership properties of a file must be modified separately. d. chown root:user1 file1 e. chown root : user1 file1

chown user1:root file1

Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it? drwxrwxrwt Srwxrwxrwx trwxrwxrwx drwxrwxrw-

drwxrwxrwt

What are the three standard Linux permissions? a. full control, read-execute, write b. read, write, modify c. execute, read, write d. read, write, examine

execute, read, write

Which command works only when you are in the root directory? find whereis type which

find

Which of the following commands can be used to recursively search a directory tree for files that meet a certain criterion without using a database or premade index of files? locate find where search

find

Which of the following commands can be used to recursively search through the directory tree in search of a file that meets a set of given criteria instead of using an indexed database? locate mlocate find where

find

Which of the following commands will display all files and directories within the /var/log directory or its subdirectories which are owned by the root user? (Choose two.) find /var/log -user root find -uid root -print /var/log find -user root -print /var/log find -path /var/log -user root

find /var/log -user root

What argument can be used with the chmod command to add read permission and remove write permission for a group on a file? u+r+w g-r+w g+r-w o+r-w

g+r-w

To remove the write permissions for a group, which two parameters should you use with the chmod command? g-w +gw -gw g+w

g-w

Which command do you need to use to verify the ACLs on a directory after they have been applied? getfacl setfacl chmod ACL

getfacl

When searching with the which command, most of the commands were found in the same directory. Which of the choices was in a different directory than the others?

halt

Which of the following directories are contained within the root directory? [Choose all that apply.] lib32 home boot mount etc

home boot etc

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.

it moves a directory it moves a file

Which command is used to create links? cp touch ln ls

ln

Which of the following commands will create a symbolic link named foo.txt to an original file named bar.txt a. ln bar.txt foo.txt b. ln foo.txt bar.txt c. ln -s bar.txt foo.txt d. ln -h foo.txt bar.txt

ln -s bar.txt foo.txt

Which of the following permissions would show for a symbolic link when displayed with the ls -l command? a. -rw-r--r-- b. srwxrwxrwx c. lrwxrwxrwx d. srw-r--r--

lrwxrwxrwx

Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands could he use to see information that would be helpful to make this determination? ls -s ls -l ls -al ls -i

ls -i

Jamie has created a hard link to another file within the same directory. Which of the following commands can he use to verify that the hard link was created correctly? (Choose all that apply.) ls -il ls -i ls -l ls -al

ls -il ls -i

You can verify the permissions on this file using the ________ command. [Choose all that apply.] acl setfacl ls -l getfacl

ls -l getfacl

Which command would you use to view the assigned SGID? ls -ll ls -lm ls -l ls -ld

ls -ld

Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist? a. mkdir -r ~/2019projects/project/projectplans b. mkdir -p ~/2019projects/project/projectplans c. mkdir --all ~/2019projects/project/projectplans d. mkdir -v ~/2019projects/project/projectplans

mkdir -p ~/2019projects/project/projectplans

To create a subdirectory within a directory, which of the following command should be used? mkdir myfolder > mydocs mkdir myfolder\mydocs mkdir myfolder/mydocs mkdir myfolder-mydocs

mkdir myfolder/mydocs

Which command do you use to rename files and directories? a. cp b. mv c. rn d. rename

mv

To which of the following can you apply the default ACL? Only to files Only to directories Both to files and directories Only to system files

only to directories

Which of the following command is used to delete a file? rm del cp mv

rm

Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.) a. rm olddir b. rmdir olddir c. rm -rf olddir d. rmdir -rf olddir

rm -rf olddir

Which package should you use to verify if the ACL package is installed on the CentOS system? cat apt-get rpm yum

rpm

The default permissions given by the system prior to analyzing the umask are ___________for directories and __________ for files. a. rw-rw-rw- and rw-rw-rw- b. rw-rw-rw- and r--r--r-- c. rw-rw-rw- and rwxrwxrwx d. rwxrwxrwx and rw-rw-rw- e. rwxrw-rw- and rwx-rw-rw-

rwxrwxrwx and rw-rw-rw-

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

searches for a file only in directories that are in the PATH variable

Which command do you use to define an access ACL? getfacl ACL setfacl chmod

setfacl

What does the /var directory contain? a. various additional programs b. spools and log files c. temporary files d. files that are architecture-independent e. local variance devices

spools and log files

Which command displays values like when last accessed, modified, or changed for a specific file? atq at ls -l stat

stat

When you change the data in a file that is hard-linked to three others, __________. a. only the data in the file you modified is affected b. only the data in the file you modified and any hard linked files in the same directory are affected c. the data in the file you modified and the data in all hard linked files are modified because they have different inodes d. 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 of the following commands can be used to update the last modified timestamp on a file, or if the file specified does not exist will create the file? a. update file.txt b. updatets file.txt c. touch file.txt d. stamp file.txt

touch file.txt

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

two

Jean installs a distribution of Linux on a workstation and attempts to run the locate command to find a certain file. Instead of returning the results she expected, an error message is displayed that it cannot find the mlocate.db file in its default location. Which of the following commands should Jean run in an attempt to resolve this problem? apt upgrade mlocate updatedb locate --update mlocate --update

updatedb

Which of the following commands will return one result of where the grep binary executable is located? (Choose two.) which grep locate grep type grep find grep

which grep type grep


Kaugnay na mga set ng pag-aaral

3.2.4 Properties of Period 3 elements and their oxides

View Set

10. CEH v11: Vulnerability Assessment, Management & Classification

View Set

Chapter 8 - Hardware Support A+, Chapter 7, Software Support A+

View Set

VOLUME 5 Chapter 6: Abuse, Neglect, and Assault

View Set

Lecture 22 - Free radicals and antioxidants

View Set