Linux Exam Ch5-8

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Callie wants to make sure that a filesystem is checked every 20 days. Which of the following options, when used with the tune2fs command, would set a full filesystem check to run every 14 days?

-i 14d

Which of the following files can you add filenames to so that the git add * command will not stage them?

.gitignore

Which of the following directories is created by default when an ext2, ext3, or ext4 filesystem is created on a device that is used by the fsck utility?

/lost+found/

Which of the following is the common escape sequence to display a horizontal tab using the echo command?

/t

To which directory will the test ZFS volume from the previous question be mounted by the ZFS system?

/test

What can be used to mount a filesystem?

A filesystem label A filesystem UUID A device path such as /dev/sdb2

How do you indicate a comment line in a shell script?

Begin the line with #

ZFS volumes are mounted at boot time from entries within /etc/fstab by default. (T/F)

False

the order in which the BASH shell environment files are read

First /etc/profile Second /etc/profile.d/* Third /etc/bashrc Fourth ~/.bashrc

___ limits can never be exceeded.

Hard

What does &> accomplish when entered on the command line after a command?

It redirects both stderr and stdout to the same location

Which of the following will the split command do on a file when no other options are specified?

It will split a file into new files that are 1,000 lines each.

When viewing the output of the lsmod command, you notice several modules that start with vmw. What does this indicate?

Linux is running as a guest operating system

A user runs the fsck command with the -f option on an ext4 filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair?

Mount the filesystem and check the lost+found directory underneath the mount point

Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the new partition information must be manually reloaded. Which of the following should she do next?

Run the partprobe command reboot the system

___ limits allow a user to exceed them for a certain period of time.

Soft

A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are remaining objects to process.(T/F)

True

Both aliases and functions can be used to store commands that can be executed, but functions can also accept positional parameters. (T/F)

True

What must you do to successfully run the fsck command on a filesystem?

Unmount the filesystem

Which of the following statements regarding LVM structure is correct

VGs are comprised of one or more PVs

What would be the effect of using the alias command to make an alias for the date command named cat in honor of your favorite pet?

When you use the cat command at the command prompt with the intention of viewing a text file, the date appears instead.

Which of the following commands can be used to display the filesystem and partition UUIDs on a Linux system?

blkid

Which of the following will display the message welcome home if the cd /home/user1 command is successfully executed?

cd /home/user1 && echo "welcome home"

Which command is used to display the amount of free space that exists on a filesystem?

df

You want to see the filesystems that are in use on the system. What command could you use?

df -T and cat /etc/mtab

If the mkfs command is executed to create a filesystem and only the block device name is specified, which of the following filesystems will be created?

ext2

Every if construct begins with if and must be terminated with?

fi

Which command can be used to download an updated copy of the master branch from the original Git repository?

git pull origin master

Which of the following describes a computer that is used to access an iSCSI hard disk across the network?

iSCSI initiator

Where is the /proc filesystem stored?

in RAM

Which of the following commands can be used on a modern Linux system to view hardware information that was captured at the beginning of the boot process?

journalctl -k

What can be used to show the block devices on a Linux system?

ls /sys/block and lsblk

Which of the following commands can be used to show the block devices, including their major and minor numbers, on a system which are located in the /sys/block directory?

lsblk

Which of the following commands can quickly determine whether your network hardware was detected properly following a Linux installation?

lshw -class network

What commands can be used to create and activate a swap partition on a Linux system

mkswap /dev/sda6 swapon /dev/sda6

Clint has run the command parted /dev/sdb and wants to display a list of the existing partitions that exist on that drive. Which of the following commands can he use to display the existing partitions?

print

Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order?

sort /etc/passwd

When configuring a virtual hard disk file, which term refers to the feature that allows the virtual hard disk file to expand dynamically as space is requested by the guest operating system?

thin provisioning

Elijah is done working with an external USB hard drive and wants to properly disconnect it. Which of the following commands should he use before unplugging the USB cable?

umount

Which of the following commands will count the number of lines in a file named data.csv?

wc -l data.csv

Which command can be used to repair an XFS filesystem?

xfs_repair /dev/sdb1

A device file ________

-Has no data section -displays a major and minor number in place of a file size

Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command?

/, /proc, and swap

You plug a USB flash memory drive into a system that has two SATA hard disks. How will the partition on this USB flash memory drive be identified by Linux?

/dev/sdc1

Which file should be configured so that quotas are enabled at boot time?

/etc/fstab

What component of a Linux server is used to connect to a Fibre Channel SAN?

FC HBA

After a partition on a hard disk is formatted with a filesystem, all partitions on that hard disk drive must use the same filesystem. (T/F)

False

Character devices typically transfer data more quickly than block devices. (T/F)

False

____can limit both user space and the number of files a user can own.

Quotas

Consider the following shell script: echo -e "What is your favorite color?--> \c" read REPLY if [ "$REPLY" = "red" -o "$REPLY" = "blue" ] then echo "The answer is red or blue." else echo "The answer is not red nor blue." fi

The answer is not read nor blue

The sed and awk commands are filter commands commonly used to format data within a pipe. (T/F)

True

A user mounts a device to a mount point directory and realizes afterward she needs files previously found within the mount point directory. What should this user do?

Unmount the device from the directory

You have redirected stderr to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why?

You did not append the stderr to the Error file, and, as a result, it was overwritten when the command was run a second time.

What does the du -s /var command do?

displays the total size of the /var directory

Which of the following commands should you use to specify that you want to use Git for version tracking on them?

git add

Which of the following commands cannot be used to create an exFAT filesystem on a USB thumb drive that is recognized as /dev/sdb?

mkfs exfat /dev/sdb1

Which command mounts all existing filesystems in /etc/fstab?

mount -a

Which of the following characters can be entered at the beginning of a line in a shell script to ensure that line is recognized as a comment rather than try to execute it?

#

Which of the following variables could access the value "/etc" within the sample shell script, if the sample shell script was executed using the bash sample /var /etc /bin command?

$2

Which of the following lines can be used to perform command substitution within a shell script?

'command' $(command)

Which of the following could result in a segmentation fault (fatal signal 11) during a Fedora installation?

-RAM problems -overclocked CPU -faulty hardware components

You attempt to perform the git commit -m "Added listdir function" but the command fails. What are possible reasons for the failure?

-The user performing the commit has not set their Git user information. -No files were added to the Git index beforehand. -The user performing the commit is not running the command from within the Git repo directory.

Jim has just installed two new SAS SSDs in his system. He properly installs the hardware in his machine. Before he can use them for data storage and retrieval, what must he do?

-create one or more partitions on each of the SSDs -Mount any partitions created on the two SSDs such that they are accessible by the operating system -format any partitions created on the SSDs with a valid filesystem recognized by Linux

Which of the following is required as a separate partition in order to use LVM?

/boot

Which of the following would be the device file for the third partition on the second SATA drive on a Linux system?

/dev/sdb3

Jackson wants to automatically mount a secondary internal hard drive when his Linux workstation boots up. In which of the following files should he configure an entry for the partition on the drive that he wants to mount?

/etc/fstab

Which of the following files is always executed immediately after any user logs in to a Linux system and receives a BASH shell?

/etc/profile

You want to view log files to get information about a problem that occurred during a Linux installation. In which directory will you likely find the log files?

/var/log

Linux servers are typically installed in a rack using rackmount server hardware. Which of the following describes the minimum height of a rackmount server?

1U

If the physical extent of a volume group is set to 32MB, what is the maximum logical volume size?

2TB

Which of the following will take output from a command and append it to the end of a file?

>>

BTRFS filesystems do not need to be checked for errors as they are resilient to data corruption. (T/F)

False

Because stderr and stdout represent the results of a command and stdin represents the input required for a command, only stderr and stdout can be redirected to/from a file. (T/F)

False

DM-MPIO can be configured to provide multiple, redundant connections to data stored on a SAN. (T/F)

False

Which of the following RAID levels is not fault tolerant?

RAID 0

What type of redundant storage configuration is most common for hosting the operating system and applications on a server?

RAID 1

The lvextend command can be used to add unused space within a volume group to an existing logical volume.(T/F)

True

Which command can you use during a system rescue to switch from the root of the live OS to the root of the Linux system installed on the hard disk?

chroot

Which of the following commands when run from the /, or root, directory will return a very long list of many pages of results?

du

What does the command dumpe2fs -h do?

dumps an ext2 filesystem

Which command is used to format a partition on a hard disk drive with the ext4 filesystem?

e2mkfs -t ext4 device

Which of the following commands will display the exit status of the last command used in the BASH shell?

echo $?

The current value for the HOME variable is displayed by which commands?

echo ~ echo $HOME

The quotas for certain users can be edited by using which command?

edquota

Before a user-defined variable can be used by processes that run in subshells, that variable must be __________.

exported

What command can be used to check different kinds of filesystems on Linux for errors?

fsck

What command can only be used to create partitions on a GPT hard disk?

gdisk

Which of the following commands will prompt to convert an MBR partition to GPT, thus destroying all existing MBR partitions on a disk?

gdisk

Which of the following commands will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file?

nl /etc/passwd

Which of the following commands can be used to scan a filesystem for disk usage, create, check, and repair quota files?

quotacheck

Which construct can be used in a shell script to read stdin and place it in a variable?

read

Which of the following commands will display a summarization of quotas for a filesystem?

repquota

Which of the following is not a type of RAID?

serial RAID

Which command could you use to see a list of all environment and user-defined shell variables as well as their current values?

set

Which type of RAID can be entirely configured during the Linux installation process?

software RAID

John has been using the cdrom on his computer that is running the Linux operating system. He pushes the eject button on the front of the drive, but it doesn't eject the disk. Which of the following commands should he run?

umount /media/cdrom eject /media/cdrom

Using the syntax below, what command will create directories named one, two, and three? ​ echo one two three | ___________ mkdir

xargs

Archie wants to optimize an XFS filesystem and minimize the chance of future corruption. Which of the following commands will compact or otherwise improve the layout of the contiguous blocks of file data for an XFS filesystem?

xfs_fsr

What command can be used to create a ZFS volume called test from the space on /dev/sdb and /dev/sdc that functions like RAID level 1?

zpool create test mirror /dev/sdb /dev/sdc

Which of the following operators reverses the meaning of a test statement?

!


Ensembles d'études connexes

[Part II, Chapter 2] Gregorian Chant

View Set

Cvent Hybrid Events Certification

View Set

2. Teil Auftrittskompetenz, Employer Branding, Rekrutierungskanäle

View Set

Anatomy and Physiology I - Chapter 10 Learnsmart

View Set