Chapter 4
Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard

THE FOLLOWING EXAM OBJECTIVES ARE COVERED IN THIS CHAPTER:

  • images  104.1 Create partitions and filesystems.
    • Key knowledge areas:
      • Manage MBR and GPT partition tables.
      • Use various mkfs commands to create various filesystems such as:
        • ext2/ext3/ext4
        • XFS
        • VFAT
        • exFAT
      • Basic feature knowledge of Btrfs, including multi-device filesystems, compression, and subvolumes
    • The following is a partial list of the used files, terms, and utilities:
      • fdisk
      • gdisk
      • parted
      • mkfs
      • mkswap
  • images104.2 Maintain the integrity of filesystems.
    • Key knowledge areas:
      • Verify the integrity of filesystems.
      • Monitor free space and inodes.
      • Repair simply filesystem problems.
    • The following is a partial list of the used files, terms, and utilities:
      • du
      • df
      • fsck
      • e2fsck
      • mke2fs
      • tune2fs
      • xfs_repair
      • xfs_fsr
      • xfs_db
  • images  104.3 Control mounting and unmounting of filesystems.
    • Key knowledge areas:
      • Manually mount and unmount filesystems.
      • Configure filesystems mounting on bootup.
      • Configure user mountable removable filesystems.
      • Use labels and UUIDs for identifying and mounting filesystems.
      • Awareness of systemd mount units
    • The following is a partial list of the used files, terms, and utilities:
      • /etc/fstab
      • /media/
      • mount
      • umount
      • blkid
      • lsblk
  • images104.4 Manage file permissions and ownership.
    • Key knowledge areas:
      • Manage access permissions on regular and special files as well as directories.
      • Use access modes such as suid, sgid, and the sticky bit to maintain security.
      • Know how to change the file creation mask.
      • Use the group field to grant file access to group members.
    • The following is a partial list of the used files, terms, and utilities:
      • chmod
      • umask
      • chown
      • chgrp
  • images  104.5 Create and change hard and symbolic links.
    • Key knowledge areas:
      • Create links.
      • Identify hard and/or soft links.
      • Copying versus linking files
      • Use links to support system administration tasks.
    • The following is a partial list of the used files, terms, and utilities:
      • ln
      • ls
  • images  104.6 Find system files and place files in the correct location.
    • Key knowledge areas:
      • Understand the correct locations of files under the FHS.
      • Find files and commands on a Linux system.
      • Know the location and purpose of important file and directories as defined in the FHS.
    • The following is a partial list of the used files, terms, and utilities:
      • find
      • locate
      • updatedb
      • whereis
      • which
      • type
      • /etc/updatedb.conf

  1. Which option best describes the following output from the ls -la command:

    lrwxrwxrwx. 1 root root 35 Jul 8 2014 .fetchmailrc -> .configs/fetchmail/.fetchmailrc?

    1. It is a file called .fetchmailrc that is linked using a symbolic link.
    2. It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.
    3. It is a directory called .fetchmailrc that is owned by user Jul.
    4. It is a local directory called .configs/fetchmail/.fetchmailrc.
  2. Assuming that a USB disk contains a single partition and is made available on /dev/sdb, which command mounts the disk in /media/usb?

    1. mount /dev/sdb1 /media/usb
    2. usbconnect /dev/sdb0 /media/usb
    3. mount /dev/sdb0 /media/usb
    4. usbmount /dev/sdb1 /media/usb
  3. Which option within a partition-mounting command will cause the partition to be mounted in such a way as to prevent execution of programs?

    1. execless
    2. stoprun
    3. noexec
    4. norun
  4. When working with partitions on disk, you see the type 0x82. Which type of partition is this?

    1. Linux
    2. Linux swap
    3. NTFS
    4. FAT
  5. Which partition type should be created for a Linux system, non-swap partition?

    1. 82
    2. 83
    3. 84
    4. L
  6. Which command can be used to determine the location of a given executable that would be run if typed from your current environment and location?

    1. which
    2. what
    3. whatis
    4. when
  7. Which of the following commands will correctly change the group ownership of the file called a.out to users?

    1. chgrp users a.out
    2. chgrp a.out users
    3. groupchg a.out users
    4. grpchg users a.out
  8. Another administrator made a change to one of the local scripts used for administrative purposes. The change was also immediately reflected in your copy of the script. However, when examining the file with ls, you see that it appears to be a normal file. What is the likely cause of such a scenario?

    1. The file was executed after edit.
    2. The administrator copied the file to yours.
    3. Your file is a hard link to the original.
    4. The file has been restored from backup.
  9. Which of the following commands shows the usage of inodes across all filesystems?

    1. df -i
    2. ls -i
    3. du -i
    4. dm -i
  10. You’re running fsck on an ext3 filesystem, and the process is taking longer than expected and requiring input from the administrator to fix issues. What option could be added to fsck next time so that the command will automatically attempt to fix errors without intervention?

    1. -o
    2. -V
    3. -y
    4. -f
  11. Which of the following describes a primary difference between ext2 and ext3 filesystems?

    1. ext3 was primarily a bug fix update to ext2.
    2. ext3 includes journaling for the filesystem.
    3. ext3 completely changed the tools needed for management of the disks.
    4. ext3 filesystems have no significant differences.
  12. Which option to umask will display the permissions to be used in a Portable Operating System Interface (POSIX) format?

    1. -P
    2. -p
    3. -S
    4. -v
  13. Which option to ln creates a symlink to another file?

    1. -sl
    2. -s
    3. -l
    4. --ln
  14. Which of the following commands can be used if you need to locate various elements of a given command, such as its binaries and man pages?

    1. whatis
    2. find
    3. whereis
    4. ls
  15. Which option in /etc/updatedb.conf will remove a path from inclusion in the results?

    1. PRUNEPATHS
    2. EXCLUDEPATHS
    3. INCLUDEEXCLUDE
    4. SEPARATEPATH
  16. According to the filesystem hierarchy standard (FHS), what is the correct location for site-specific data for a server?

    1. /etc
    2. /var
    3. /tmp
    4. /srv
  17. Which of the following commands enables the sticky bit for a user on a file called homescript.sh?

    1. chmod +sticky homescript.sh
    2. chmod 755 homescript.sh
    3. chmod u+s homescript.sh
    4. chown u+sticky homescript.sh
  18. Which option to the mount command will mount all filesystems that are currently available in /etc/fstab?

    1. -g
    2. -a
    3. -r
    4. -y
  19. Which command is used to format a swap partition?

    1. fdisk
    2. mkswap
    3. formatswap
    4. format -s
  20. Which command and option is used to display the number of times that a filesystem has been mounted?

    1. tune2fs -l
    2. cat /etc/fstab
    3. mount -a
    4. less /etc/fsmnt
  21. Which option to xfs_metadump displays a progress indicator?

    1. -g
    2. -p
    3. -f
    4. -v
  22. The system is running out of disk space within the home directory partition and quotas have not been enabled. Which command can you use to determine the directories that might contain large files?

    1. du
    2. df
    3. ls
    4. locate
  23. Which file contains information about the filesystems to mount, their partitions, and the options that should be used to mount them?

    1. /etc/filesystems
    2. /etc/mounts
    3. /etc/fstab
    4. /srv/mounts
  24. According to the FHS, what is the proper mount point for removable media?

    1. /etc
    2. /srv
    3. /tmp
    4. /media
  25. Which file contains information on currently mounted filesystems, including their mount options?

    1. /etc/mtab
    2. /etc/fstab
    3. /tmp/files
    4. /etc/filesystems
  26. Which option to umount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails?

    1. -o
    2. -r
    3. -f
    4. -v
  27. The umask reports as 022. What is the permission that will be in effect for a newly nonexecutable created file?

    1. u+rw, g+r, w+r
    2. 755
    3. 022
    4. a+r
  28. The locate command is reporting out-of-date information. Which command should be run in order to have the locate command update its database?

    1. locatedb -u
    2. locate -u
    3. updatedb
    4. updatelocate
  29. Which shell built-in command can be used to determine what command will be run?

    1. type
    2. when
    3. find
    4. help
  30. Which option to chown recursively changes the ownership?

    1. -f
    2. -R
    3. -a
    4. -m
  31. Which of the following represents the correct format for the /etc/fstab file?

    1. <directory> <device> <type> <options>
    2. <device> <type> <options>
    3. <device> <type> <options> <directory> <dump> <fsck>
    4. <filesystem> <mount point> <type> <options> <dump> <pass>
  32. Which of the following commands is used to identify the UUID for partitions?

    1. blkid
    2. ls
    3. find
    4. cat
  33. Which of the following describes the priority order for configuration files with systemd?

    1. Files in /etc/, files in /run, and then files in /lib
    2. Files in /run, files in /etc/, and then files in /lib
    3. Files in /lib, files in /run, and then files in /etc
    4. Files in /lib, files in /etc, and then files in /run
  34. Which options to the fsck command will find and automatically assume that it should repair errors that it finds?

    1. -y
    2. -vy
    3. -my
    4. -xy
  35. Which option to mke2fs sets the type of filesystem to be created?

    1. -F
    2. -a
    3. -t
    4. -e
  36. Which of the following files is the default configuration file for the autofs automounter?

    1. /etc/autofs
    2. /etc/auto.master
    3. /etc/autofs.conf
    4. /etc/automounter.conf
  37. Which of the following commands is used to create an ISO filesystem?

    1. mkiso
    2. mkfsiso
    3. mkisofs
    4. isofs-mk
  38. Which option to the tune2fs command sets the maximum mount count before the system will automatically run fsck on the partition on boot?

    1. -b
    2. -c
    3. -C
    4. -a
  39. Which option to the mount command can be used to simulate the mount process without actually mounting the filesystem?

    1. -q
    2. -v
    3. -l
    4. -f
  40. When viewing /proc/mounts, you see a filesystem with the letters ro in the fourth column. To what do the letters ro refer?

    1. relative option
    2. realtime option
    3. read-only
    4. relative-only
  41. Which option to dumpe2fs displays the bad blocks for a given partition?

    1. -bb
    2. -C
    3. -b
    4. -f
  42. Which of the following filesystem types features copy-on-write?

    1. ext3
    2. ext4
    3. FAT
    4. Btrfs
  43. Which of the following commands displays filesystem geometry for an XFS filesystem?

    1. xfsinfo
    2. xfs_info
    3. xfs -info
    4. xfs --info
  44. Which of the following commands can be used to display information such as the UUID for partitions on a system?

    1. blkid
    2. blockdev
    3. devinfo
    4. uuidinfo
  45. Which option to the umount command will cause it to unmount only filesystems of the specified type?

    1. -v
    2. -f
    3. -t
    4. -a
  46. Which command causes unwritten data to be written to disk immediately?

    1. write
    2. wrnow
    3. connwrite
    4. sync
  47. Which option to xfs_check is used to verify a filesystem that is stored in a file?

    1. -v
    2. -a
    3. -f
    4. -d
  48. Which option to debugfs causes the filesystem to be opened in read-write mode rather than the default read-only?

    1. -rw
    2. -w
    3. -r
    4. -n
  49. Which daemon is responsible for monitoring Self-Monitoring, Analysis, and Reporting Technology (SMART)-compatible hard drives?

    1. smartmon
    2. smarty
    3. sartd
    4. smartd
  50. When checking an ext3 filesystem, which option to the fsck.ext3 command causes it to run the check even if the filesystem is apparently marked as clean?

    1. f
    2. -m
    3. -a
    4. -c
  51. You are performing an xfsrestore. The xfsdump was executed with a block size of 4MB. Which option do you need to invoke on xfsrestore in order for it to successfully use this dump?

    1. -b 4M
    2. -g 1M
    3. -i 1M
    4. -k 1028K
  52. You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?

    1. ro, exec, auto
    2. rw, suid, dev, exec, auto, nouser, async
    3. rw, exec, auto, nouser, async
    4. rw, exec, nouser, async, noauto, suid
  53. Which of the following commands creates a btrfs subvolume?

    1. btrfs create subvolume
    2. btrfs subvolume create
    3. btrfs sv create
    4. btrfs svcreate
  54. Which of the following options to xfsdump sets the maximum size for files to be included in the dump?

    1. -p
    2. -s
    3. -z
    4. -b
  55. Which option to the tune2fs command sets the behavior when a filesystem error occurs?

    1. -f
    2. -d
    3. -e
    4. -k
  56. The /etc filesystem has been mounted as a read-only for a recovery process. You need to mount another partition. Which option to the mount command causes it to not write to /etc/mtab?

    1. -a
    2. -m
    3. -b
    4. -n
  57. Which of the following commands deactivates swap space?

    1. swapoff
    2. swap -off
    3. unmountswap
    4. uswap
  58. Within the [mount] section of a systemd mount unit, which directive specifies the location for mounting the chosen filesystem?

    1. Where=
    2. Location=
    3. List=
    4. Dest=
  59. Which of the following commands can be used to format a FAT filesystem?

    1. mkfs.fat
    2. mkfs -f
    3. mkfs --fat
    4. mkfat
  60. Which of the following commands adds a journal to an existing ext2 filesystem?

    1. tune2fs -jrn
    2. e2fs -x
    3. tune3fs
    4. tune2fs -j
  61. Which of the following commands creates a snapshot of a btrfs subvolume?

    1. btrfs subvolume snapshot
    2. btrfs snapshot --create
    3. btrfs create snapshot
    4. btrfs --create
  62. Which option to xfs_repair will force log zeroing even if there may be metadata within the log?

    1. -L
    2. -v
    3. -d
    4. -V
  63. Which of the following commands mounts a filesystem in read-only mode?

    1. mount read-only
    2. mount --read
    3. mount -o ro
    4. mount -or
  64. When you are using tune2fs to set an extended option such as stripe_width, which command-line option is needed to signify that an extended option follows?

    1. -extend
    2. -E
    3. -e
    4. -f
  65. Which utility is used for formatting GPT disks?

    1. gdisk
    2. gptdisk
    3. gpdisk
    4. pgdisk
  66. What is the maximum size of a partition on an MBR-formatted disk?

    1. 2TB
    2. 4TB
    3. 2MB
    4. 512TB
  67. Which option to mkfs.ext4 can be used to prevent reservation of blocks for system or superuser use?

    1. -r 0
    2. -r 0b
    3. -m 0
    4. -m 0b
  68. What is the default time in seconds that xfs_fsr will use to reorganize a filesystem?

    1. 3600
    2. 7200
    3. 86400
    4. 5150
  69. A user who is a member of the custom admins group is attempting to read the contents of a file but is not the owner of the file. Rather than granting sudo access to this file, what is another way to grant read access, assuming that the file is currently marked with 640 permissions? Note that you should choose the most appropriate answer to fulfill the need while minimizing additional privileges.

    1. Grant root access to the user.
    2. Run chmod 777 on the file.
    3. Use chgrp to change group ownership to admins.
    4. Use chown to change the ownership of the file to the individual user.
  70. Which option to lsblk shows empty devices?

    1. -g
    2. -a
    3. -r
    4. -y
  71. The /media/ mount point is used frequently for which types of devices?

    1. Hard drives
    2. SAN
    3. NAS
    4. USB devices
  72. Which of the following commands is used to format an exFAT filesystem?

    1. mkexfat
    2. mkfat.ex
    3. mkfs.exfat
    4. mkfs2.exf
  73. Which of the following commands is used for debugging an XFS-formatted filesystem?

    1. debug_xfs
    2. xfs_debug
    3. xfs_db
    4. debugxfs
  74. You’re working with an ext2 filesystem and you suspect the superblock is corrupted. Which option to e2fsck enables you to specify the location of an alternate superblock?

    1. -B
    2. -s
    3. -b
    4. -o
  75. Which option to df shows the numerical output in larger size increments, like MB, GB, TB, and so on rather than in bytes?

    1. -h
    2. -m
    3. -n
    4. -s
  76. Assuming the use of Bash for the shell, in which file can the umask be set such that the file creation mask is set automatically on login?

    1. /etc/umask.def
    2. /etc/profile
    3. /etc/bash.d/umask
    4. /etc/bash.umask
  77. You need to enable two users to edit the same file but keep their own individual changes. Another administrator suggested making a symbolic link for the file. Is a symbolic link the appropriate solution for this scenario and, if not, what is?

    1. A symbolic link is not appropriate because the users cannot keep their own changes. A copy would be a better option.
    2. A symbolic link is appropriate here because each user can access the file, assuming write permissions.
    3. A symbolic link is not appropriate given that the users will not have permissions on symbolic links. Linux cannot meet the scenario described.
    4. A symbolic link is appropriate because symbolic links have the ability to do version control, thus enabling the scenario.
  78. You have deleted a user from the system and want to determine if this user still has files on the system. Which command will fulfill this scenario?

    1. locate <user>
    2. find -uid <uid>
    3. find -user <user>
    4. fileloc -user <user>
  79. You need to update the locate database. Which of the following commands is used for this purpose?

    1. updatedb
    2. locatedb
    3. updlocdb
    4. locdbupd
  80. Which option to lsblk shows the UUID of each filesystem?

    1. –u
    2. -f
    3. -o
    4. -a
  81. Which option to mkswap checks the device for bad blocks before formatting?

    1. -b
    2. -B
    3. -c
    4. -d
  82. You are examining output from ls -la and one file contains the permissions -rwSrw-r--. To what does the S refer?

    1. Specific execute
    2. Source formatting
    3. Selective execution
    4. Sticky bit
  83. You need to change file permissions to be setgid for a file called sync.sh. The file is normally permission 755. Which of the following commands accomplishes this task?

    1. chmod 2775 sync.sh
    2. chmod u+s sync.sh
    3. chmod 2755 sync.sh
    4. chmod 4755 sync.sh
  84. Which of the following commands finds files with a .sql extension across the entire filesystem?

    1. find . -name "*.sql"
    2. find /root -ext sql
    3. find / -name "*.sql"
    4. find / -exten ".sql"
  85. When working with /etc/fstab to mount by UUID, which syntax is correct as the first column in /etc/fstab, assuming a UUID denoted by <UUID>?

    1. <UUID>
    2. UUID=<UUID>
    3. ID=<UUID>
    4. GPT=<UUID>
  86. Which option to du displays information on inode usage?

    1. -i
    2. -h
    3. --inodes
    4. -d
  87. Which of the following find commands will look for files that are over 1GB in size?

    1. find -size +1G
    2. find -size 1GB
    3. find -fssize +1GB
    4. find -filesize +1G
  88. You have a set of libraries that were installed into /usr/local/lib and would like to ensure that the libraries are also available in /usr/lib. What is the preferred way to make the libraries available in this location?

    1. Copy the libraries.
    2. Create a symbolic link.
    3. Move the libraries.
    4. Create a script to synchronize the libraries between the two locations with rsync.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset