TESTS Ch4. Devices, Linux Filesystems, and the Filesystem Hierarchy Standard (Domain 104)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which file contains information on currently mounted filesystems, including their mount options? A. /etc/mtab B. /etc/fstab C. /tmp/files D. /etc/filesystems

A. The /etc/mtab file contains currently mounted filesystems. Note that /etc/fstab contains filesystem information but not about which filesystems are currently mounted.

Which of the following commands is used to identify the UUID for partitions? A. blkid B. ls C. find D. cat

A. The blkid command will show partition UUIDs. You can also get this information with the lsblk -no UUID <partition> command. The other commands shown in this question do not accomplish the required task.

Which of the following commands will correctly change the group ownership of the file called a.out to users? A. chgrp users a.out B. chgrp a.out users C. groupchg a.out users D. grpchg users a.out

A. The chgrp command can be used to change group ownership of a file. The order is chgrp <groupname> <target>.

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? A. du B. df C. ls D. locate

A. The du command will report on disk usage in a recursive manner, unlike the other commands shown here.

Which command and option are used to display the number of times that a filesystem has been mounted? A. tune2fs -h B. cat /etc/fstab C. mount -a D. less /etc/fsmnt

A. The tune2fs command displays a lot of information about filesystems including the number of times that the filesystem has been mounted.

Which command and option are used to set the maximum number of times that a filesystem can be mounted between running fsck? A. tune2fs -c B. tune2fs -f C. tune2fs -m D. setmount

A. The tune2fs command is used for this purpose, and the -c option sets the mount count for the specified partition.

Which shell built-in command can be used to determine what command will be run? A. type B. when C. find D. help

A. The type built-in command returns the location that the shell will use in order to run the given command. The find command cannot be used for this purpose, and the other commands do not exist.

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? A. which B. what C. whatis D. when

A. The which command returns the full path to the given command, and it is useful for determining both whether a given command is available and the location from which the command will run.

According to the FHS, what is the proper mount point for removable media? A. /etc B. /srv C. /tmp D. /media

D. The /media mount point is used for removable media. See https://wiki.linuxfoundation.org/en/FHS for more information on the FHS.

According to the FHS, what is the correct location for site-specific data for a server? A. /etc B. /var C. /tmp D. /srv

D. The /srv hierarchy is used for data for server programs. The /etc hierarchy is configuration information, while /var is also used for data files but variable ones such as mail files. The /tmp directory is for temporary files.

Which option within gdisk will change the partition name? A. n B. b C. v D. c

D. The c option in gdisk is used to change the partition name. The n option creates a new partition, the v option verifies the disk, and the b option creates a backup of GPT data to a file.

Which option to xfs_metadump displays a progress indicator? A. -g B. -p C. -f D. -v

A. The -g option displays progress of the dump. The other options listed do not exist.

Which of the following commands shows the usage of inodes across all filesystems? A. df -i B. ls -i C. du -i D. dm -i

A. The -i option to df produces information on inodes across all filesystems. The ls -i option will produce inode listings but only for the current directory. The -i option is invalid for du, and dm does not exist as a command.

Which option in /etc/updatedb.conf will remove a path from inclusion in the results? A. PRUNEPATHS B. EXCLUDEPATHS C. INCLUDEEXCLUDE D. SEPARATEPATH

A. The PRUNEPATHS option accepts a space-separated list of paths to remove from the results. The other options listed in this question do not exist.

You need to enable the web server (running as the www-data user and group) to write into a directory called /home/webfiles. Which commands will accomplish this task in the most secure manner? A. chgrp www-data /home/webfiles; chmod 775 /home/webfiles B. chmod 777 /home/webfiles C. chgrp www-data /home/webfiles; chmod 711 /home/webfiles D. chmod 707 /home/webfiles

A. The best option among these choices is to change the group to www-data and change the permissions such that the group can write into the directory. Option B should never be used because it enables world writing to the directory. The other options will not allow the web server group to write into the directory.

Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding the root partition? A. -NR B. -AM C. -X D. -C

B. The -A option checks all filesystems in /etc/fstab, while the -M option excludes the root filesystem. The fsck that will run will be dependent on the type of filesystem. For example, e2fsck will be executed for ext2 partitions.

Which option to chown recursively changes the ownership? A. -f B. -R C. -a D. -m

B. The -R option will perform the change ownership in a recursive manner.

Which option to umount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails? A. -o B. -r C. -f D. -v

B. The -r option causes umount to attempt to remount in read-only mode. The -v option is verbose mode, and the -f option forces the operation. The -o option does not exist.

Which option to ln creates a symlink to another file? A. -sl B. -s C. -l D. --ln

B. The -s option to ln creates a symbolic link or symlink.

Which of the following describes a primary difference between ext2 and ext3 filesystems? A. ext3 was primarily a bugfix update to ext2. B. ext3 includes journaling for the filesystem. C. ext3 completely changed the tools needed for management of the disks. D. ext3 has no significant differences.

B. The addition of journaling in ext3 increased filesystem reliability and performance.

When using ls -la to obtain a directory listing, you see an object with permissions of lrwxrwxrwx. What type of object is this? A. It is a directory. B. It is a symlink. C. It is a temporary file. D. It is a local file.

B. The l within the listing indicates a symlink. There is no way to tell if a file or directory is temporary. A directory will display a d instead of an l. Symbolic links are not copies of files but rather are akin to shortcuts. Changes to the contents of the symlink change the source file as well.

Which of the following commands will create a btrfs filesystem on the first SATA drive? A. mkfs /dev/sda1 B. mkfs.btrfs /dev/sda C. mkfs.btr2fs /dev/sda1 D. mkfs -b /dev/sda

B. The mkfs.btrfs command is used to create btrfs filesystems and does not require the drive to be partitioned.

C. The -a option mounts all filesystems in /etc/fstab that are currently available. Of the other options listed, only the -f option is available and it is a shortcut to the "fake" option that does nothing except perform a dry run of the mount.

B. The mkswap command formats a swap partition. The fdisk command is used to create the partition itself but not format it. The other two options do not exist.

Which command can be used to change the partitioning scheme for a disk, such as to change the size of existing partitions without deleting them? A. resize2fs B. parted C. mkfs D. rfdisk

B. The parted command can be used to resize partitions in such a way. The mkfs command is not used for this purpose, and the other two options do not exist.

Which command is used to enable quotas on a filesystem that has been previously set up for quota usage? A. quotaenable B. quotaon C. quotau D. enquota

B. The quotaon command signifies that quotas should be enabled for the given filesystem. This would imply that a quota file has already been created. Quotas can be edited with the edquota command.

Which command and option will output a summary of quota usage across all filesystems that are currently read-write with quotas enabled? A. repq -a B. repquota -a C. quotarun -a D. quota -u

B. The repquota command is used for this purpose, and the -a option will display information for all filesystems.

You are using a SAN (storage area network) that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and option can you use to change the behavior of the filesystem to account for the SAN bug? A. mount— --continue B. tune2fs -e continue C. mkfs --no-remount D. mount -o remount

B. The tune2fs command can be used for this purpose but should be used with care because it can result in data corruption.

Which option to chgrp will change group ownership of all files within a given directory? A. -directory B. -d C. -R D. -V

C. The -R option sets the recursive option, which means that chgrp will traverse the given directory and perform the group ownership change operation throughout the specified hierarchy.

Which option to umask will display the permissions to be used in a POSIX format? A. -P B. -p C. -S D. -v

C. The -S option displays output in a format such as u=rwx,g=rx,o=rx. The other options listed in this problem do not exist.

Which option to the mount command will mount all filesystems that are currently available in /etc/fstab? A. -f B. -d C. -a D. -m

C. The -a option mounts all filesystems in /etc/fstab that are currently available. Of the other options listed, only the -f option is available and it is a shortcut to the "fake" option that does nothing except perform a dry run of the mount.

Which option to the dumpe2fs command can be used to display blocks that are reserved because of being marked as bad? A. -v B. -f C. -b D. -m

C. The -b option prints known bad blocks. The -f option is used to force the display of information, and the other options don't exist.

When running fsck on an ext3 filesystem, 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? A. -o B. -V C. -y D. -f

C. The -y option will attempt to repair automatically, essentially answering y, or yes, instead of prompting. Of the other options, only -V is valid and will produce verbose output.

Which file contains information about the filesystems to mount, their partitions, and the options that should be used to mount them? A. /etc/filesystems B. /etc/mounts C. /etc/fstab D. /srv/mounts

C. The /etc/fstab file is used to store information about the filesystems to mount within the system.

The umask command reports the mask as 022. What is the permission that will be in effect for a newly non-executable created file? A. u+rw, g+r, w+r B. 755 C. 022 D. a+r

C. The 022 umask value will translate into 644 permissions on a new nonexecutable file.

Which of the following commands will mount a USB device at /dev/sdb1 into the /media/usb directory, assuming a VFAT filesystem for the USB drive? A. mount -t vfat /dev/sdb1 /mnt B. usbmount /dev/sdb1 /mnt/usb C. mount -t vfat /dev/sdb1 /media/usb D. mount -t usb /dev/sdb1 /mnt/usb

C. The VFAT filesystem is known as vfat to the mount command, and the other elements of the mount command are standard.

Which of the following commands enables the sticky bit for a user on a file called homescript.sh? A. chmod +sticky homescript.sh B. chmod 755 homescript.sh C. chmod u+s homescript.sh D. chown u+sticky homescript.sh

C. The chmod command is used for this purpose, and the u+s option sets the sticky bit for the user on the specified target.

The SAN has crashed and one of the filesystems in a Linux server has become significantly corrupt as a result. Which command and option can be used to attempt to examine the contents of the drive without causing more damage? A. fdisk -f B. mke2fs -c C. debugfs -c D. ls -a

C. The debugfs command can be used for this purpose. When opening with -c, the filesystem will be opened in catastrophic mode, meaning that it will be opened readonly and will not read inodes when opening.

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, it appears to be a normal file. What is the likely cause of such a scenario? A. The file was executed after edit. B. The administrator copied the file to yours. C. Your file is a hard link to the original. D. The file has been restored from backup.

C. The file is almost certainly a hard link to the original script. While ls won't show this information, the stat command will show that it is a link and also show the inode to which the file is linked.

Which option in /etc/fstab sets the order in which the device is checked at boot time? A. options B. dump C. fsck D. checkorder

C. The fsck option, which is represented as a number in the /etc/fstab file, sets the order in which the device is checked at boot time.

The locate command is reporting out-of-date information. Which command should be run in order to have the locate command update its database? A. locatedb -u B. locate -u C. updatedb D. updatelocate

C. The updatedb command will update the database used by the locate command.

Which option is set on a filesystem in order to enable user-level quotas? A. quotaon B. enquota=user C. usrquota D. userquota

C. The usrquota option will enable user-level quotas on the given mount point. This is typically set within /etc/fstab.

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? A. whatis B. find C. whereis D. ls

C. The whereis command displays pertinent information about the command given as its argument. For example, entering whereis apache2 on a Debian system will show the binary location, configuration file location, and other relevant details.

Which option to quotacheck is used to create the files for the first time? A. -f B. -u C. -m D. -c

D. The -c option creates the files for the first time. The -f option is used to force checking, -u is used for user quotas, and -m is used to not attempt remounting as readonly.

Which option to the find command will search for files by their inode number? A. -inode B. -type C. -in D. -inum

D. The -inum option searches for files by their inode number. This can be useful when searching for the files involved in hard links.

After you insert a new hard drive into the system, what is the correct order to make the drive ready for use within Linux? A. Use fdisk to create partitions and then mount the partitions. B. Mount the partitions. C. Use fdisk to create partitions and mount -a to mount all of the newly created partitions. D. Use fdisk to create partitions, then format the partitions with something like mkfs, and then mount the partitions.

D. The first step is to use fdisk to create one or more partitions, then format the partitions, and then mount the partitions for use. The fdisk command is used with various types of disks including MBR-based partitions.

Which of the following represents the correct format for the /etc/fstab file? A. <directory> <device> <type> <options> B. <device> <type> <options> C. <device> <type> <options> <directory> <dump> <fsck> D. <device> <directory> <type> <options> <dump> <fsck>

D. The proper order is the device (UUID or partition), followed by the directory to mount that device, followed by its type and options, and then the dump and fsck settings.

Which command is used to execute a check of user quotas on the filesystem? A. quota -u B. runquota -u C. qcheck -u D. quotacheck -u

D. The quotacheck command is used to update the quota file for the given filesystem. The quota -u command will display the current quota for a given user. The other commands do not exist.

The xfs_info command is functionally equivalent to which command and option? A. xfs_test -n B. xfs_list C. tunexfs -i D. xfs_growfs -n

D. The xfs_info command is equivalent to xfs_growfs -n.


संबंधित स्टडी सेट्स

Health Psychology Practice Exam 2 CH 6-9, PSY303 Module 4 - Seeking and Using Health Care Services (2 Weeks), Pre-test Health Final (part 1), Psych 313 chapter 9, Psych 313 chapter 8, CH.8, Health CH-7, PSYC 313 Midterm Ch. 7, Quiz 7, Chapter 7 Pract...

View Set

Chem. - Ch.13 Phase Changes Review

View Set

Intro to Interpersonal Communication chapters 1-2 quizzes

View Set

Financial Accounting Ch. 1 and 2

View Set

Delirium and Dementia, Immobility

View Set