100% found this document useful (66 votes)
537 views

CompTIA Linux+ Guide To Linux Certification 4th Edition Eckert Test Bank 1

The document contains a test bank for the CompTIA Linux+ Guide to Linux Certification 4th Edition textbook by Eckert. It includes 35 multiple choice and true/false questions, short answer questions, and essay questions about Linux filesystem management. Specific topics covered include the filesystem hierarchy standard, commands for copying, moving and removing files, permissions including SUID and SGID, and the structure of the Linux filesystem including inodes, superblocks and data blocks. An example is given that the ping command commonly has the SUID permission set so regular users can test network connectivity with root privileges.

Uploaded by

miles
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (66 votes)
537 views

CompTIA Linux+ Guide To Linux Certification 4th Edition Eckert Test Bank 1

The document contains a test bank for the CompTIA Linux+ Guide to Linux Certification 4th Edition textbook by Eckert. It includes 35 multiple choice and true/false questions, short answer questions, and essay questions about Linux filesystem management. Specific topics covered include the filesystem hierarchy standard, commands for copying, moving and removing files, permissions including SUID and SGID, and the structure of the Linux filesystem including inodes, superblocks and data blocks. An example is given that the ping command commonly has the SUID permission set so regular users can test network connectivity with root privileges.

Uploaded by

miles
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CompTIA Linux+ Guide to Linux Certification 4th

Edition Eckert
Full download at link:

Test bank: https://testbankpack.com/p/test-bank-for-comptia-linux-guide-to-


linux-certification-4th-edition-by-eckert-isbn-1305107160-9781305107168/

Solution Manual: https://testbankpack.com/p/solution-manual-for-comptia-


linux-guide-to-linux-certification-4th-edition-by-eckert-isbn-1305107160-
9781305107168/

Chapter 04 Linux Filesystem Management

TRUEFALSE

1. The rmdir command automatically removes a directory and all of its subdirectories and files.

(A) True

(B) False

Answer : (B)

2. You can use wildcard metacharacters with the find command.

(A) True

(B) False

Answer : (A)

3. The SGID allows regular users to execute a binary compiled program and become a member of
the group that is attached to the file.

(A) True (B)

False

Answer : (A)

4. Shell scripts do not require the execute permission in order to be run the same way binary
programs are run.
(A) True (B)

False

Answer : (B)

5. The database for the locate command can be updated manually by using the updatedb
command.

(A) True

(B) False

Answer : (A)
MULTICHOICE

6. The Filesystem Hierarchy Standard specifies what directory as containing the Linux kernel and
the boot loader configuration files?

(A) /load

(B) /bin

(C) /boot

(D) /mnt

Answer : (C)

7. The Filesystem Hierarchy Standard specifies what directory as the root user's home directory?

(A) /bin

(B) /home/root

(C) /boot (D)

/root Answer

: (D)

8. What command can be used to copy files?

(A) copy

(B) mv

(C) cp

(D) cpy

Answer : (C)

9. What command below takes a list of arguments specifying the absolute or relative pathnames of
files to remove?

(A) del

(B) rm

(C) remove

(D) delete

Answer : (B)
10. Select the command below that utilizes a premade database that contains a list of all the files on
a system:

(A) search

(B) id

(C) find

(D) locate

Answer : (D)

11. The contents of a certain variable in memory can be viewed using which metacharacter below in
combination with the echo command?

(A) $

(B) *

(C) &

(D) #

Answer : (A)

12. What section of a filesystem contains information about the filesystem in general?

(A) inode table

(B) inode

(C) data blocks

(D) superblock

Answer : (D)

13. In order to create a hard link, what command must be used?

(A) ln

(B) link

(C) lnk

(D) lk

Answer : (A)

14. The section of an inode that stores permissions is referred to as what?


(A) the tail of the file

(B) the head of the file

(C) the mode of the file

(D) the accessor of the file

Answer : (C)

15. In a file's mode, a permission that is unavailable is represented by what character?

(A) *

(B) +

(C) ?

(D) -

Answer : (D)

16. What permission grants a user the ability to open, read, and edit the contents of a file?

(A) write

(B) execute

(C) read (D)

alter Answer

: (A)

17. What argument can be used with the chmod command to add read permission and remove write
permission for a group on a file?

(A) u+r+w

(B) g-r+w

(C) g+r-w

(D) o+r-w

Answer : (C)

18. When using the chmod command, the mode rwx can be represented by which number?

(A) 0
(B) 1

(C) 7

(D) 8

Answer : (C)

19. In order to set all of the special permissions on a certain file or directory, which command below
should be used on a file named filename?

(A) chmod 777 filename

(B) chmod 7777 filename

(C) chmod 6666 filename

(D) chmod 0000 filename

Answer : (B)

20. What does the setfacl -b command do?

(A) It removes all extra ACL assignments on a given file

(B) It sets 7777 on a given file or folder for all users / groups

(C) The file's user / group ownership is changed to to root / root

(D) The file's ACL assignments are created and are then ready to be modified.

Answer : (A)

21. In order to quickly create an empty file, what command can be used?

(A) vim file1

(B) touch file1

(C) echo file1

(D) create file1

Answer : (A)

22. What permission (when applied to a directory) allows a user to enter the directory and work with
directory contents?

(A) read

(B) write
(C) execute

(D) sticky bit

Answer : (C)

23. What permission (when assigned to a file) grants a user the ability to open, read, and edit the
contents of a file?

(A) read (B)

write (C)

execute

(D) sticky bit

Answer : (B)

24. Select the mode below that corresponds to setting r-x:

(A) 1

(B) 2

(C) 5

(D) 6

Answer : (C)

25. What option, when added to the rm command, is commonly referred to as the -resume option?

(A) -d

(B) -r

(C) -f

(D) -i

Answer : (B)

SHORTANSWER

26. defines a standard set of directories for use by all Linux and UNIX systems,
as well as the file and subdirectory contents of each directory.Answer : Filesystem Hierarchy
Standard (FHS)
Answer : Filesystem Hierarchy Standard
Answer : FHS

27. To copy a directory full of files in Linux, you must tell the cp command that the copy will be
(involve files and subdirectories too) by using the -r optionAnswer : recursive

28. The command only searches directories that are listed in a special variable
called the PATH variable in the current BASH shell.Answer : which

29. To create a(n) link, you use the -s option to the ln command.Answer :
symbolic

30. When a user creates a file or directory, that user's name and becomes the
owner and group owner of the file, respectively.Answer : primary group

ESSAY

31. What are the three main structural sections of a Linux filesystem? Describe each section.

Graders Info :

The three main structural section of the Linux filesystem are the superblock, the inode table, and the
data blocks.
The superblock is the section that contains information about the filesystem in general, such as the
number of inodes and data blocks, as well as how much data a data block stores in Kilobytes. The
inode table consists of several inodes (information nodes); each inode describes one file or directory
on the filesystem, and contains a unique inode number for identification.What is more important, the
inode stores information such as the file size, data block locations, last date modified, permissions,
and ownership. When a file is deleted, only its inode (which serves as a pointer to the actual data) is
deleted. The data that makes up the contents of the file as well as the filename are stored in data
blocks, which are referenced by the inode. In filesystem-neutral terminology, blocks are known as
allocation units because they are the unit by which disk space is allocated for storage.

32. Describe hard and symbolic links. What is the difference between them?

Graders Info :

Hard linked files are direct copies of one another, as they share the same inode and inode number.
All hard linked files have the same size, and when one file is modified, the other hard linked files are
updated as well. You can hard-link a file an unlimited number of times; however, the hard linked files
must reside on the same filesystem. Although hard links share the same inode, deleting a hard linked
file does not delete all the other hard linked files.
Symbolic links are different than hard links because they do not share the same inode and inode
number with their target file; one is merely a pointer to the other and, thus, both files have different
sizes. The data blocks in a symbolically linked file contain only the pathname to the target file. When
a user edits a symbolically linked file, he is actually editing the target file. Thus, if the target file is
deleted, the symbolic link serves no function, as it points to a nonexistent file.

33. How does the execute permission apply to a directory?

Graders Info :

The execute permission on a directory is sometimes referred to as the search permission,and works
similarly to a light switch. When a light switch is turned on, you can navigate a room and use the
objects within it.However, when a light switch is turned off, you cannot see the objects in the room,
nor can you walk around and view them. A user who does not have the execute permission to a
directory is prevented from listing the directory's contents, adding and removing files, and working
with files and subdirectories inside that directory, regardless of what permissions the user has to
them. In short, a quick way to deny a user from accessing a directory and all of its contents in Linux
is to take away the execute permission on that directory. Because the execute permission on a
directory is crucial for user access, it is commonly given to all users via the other category, unless
the directory must be private.

34. Describe the SUID. Give an example of a command that typically has this permission set.

Graders Info :

The SUID has no special function when set on a directory; however, if the SUID is set on a file and
that file is executed, the person who executed the file temporarily becomes the owner of the file
while it is executing. Many commands on a typical Linux system have this special permission set; the
ping command that is used to test network connectivity is one such file. Because this file is owned
by the root user, when a regular user executes the ping command, that user temporarily becomes
the root user while the ping command is executing in memory. This ensures that any user can test
network connectivity as the person who has all rights to do so on the system. Furthermore, the SUID
can only be applied to binary compiled programs. The Linux kernel does not let you apply the SUID
to a shell script because shell scripts are easy to edit and, thus, pose a security hazard to the system.

35. Describe the SGID special permission, and provide an example of where this permission might
be used.

Graders Info :

The SGID allows regular users to execute a binary compiled program and become a member of the
group that is attached to the file. Thus, if a file is owned by the group "sys" and also has the SGID
permission, any user who executes that file will be a member of the group "sys" during execution. If
a command or file requires the user executing it to have the same permissions applied to the sys
group, setting the SGID on the file simplifies assigning rights to the file for user execution.
Additionally, if a user creates a file in a directory that has the SGID permission
set, that user's name becomes the owner of the file and the directory's group becomes the group
owner of the file.
MATCH

36. Match each correct item with the statement below.

MULTICHOICE

37. If a file's permissions are set to 760, what permission(s) are available to the group assigned to
the file?

(A) read (B)

write (C)

execute (D)

move

Answer :

38. What two commands below can be used to locate files on a filesystem?

(A) locate

(B) search

(C) find

(D) query

Answer :

39. What two commands below will work recursively if specified with the -R option?

(A) mkdir

(B) mv

(C) cp

(D) rm

Answer :

40. What two commands below will grant only the execute permission to username bob on file1,
assuming that bob is the file's owner?

(A) chmod 777 file1

(B) chmod u=x file1


(C) chmod 0110 file1

(D) chmod a+rwx file1

Answer : (A)

41. What two special permissions can be applied in order to effectively allow a user to become
owner of a file, or become a member of a group, by executing a file?

(A) sticky bit

(B) SUID

(C) SGID

(D) SQUID

Answer :

You might also like