Chapter 3
Using wildcard metacharacters, how can you indicate a character that is not an a or b or c or d?
!a-d
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?
---r--rw-
The command chmod 317 file1 would produce which of the following lines in the ls command?
--wx--xrwx 1 user1 root 0 Apr 29 15:40 file1
Which of the following is an absolute pathname?
-C:\myfolder\resume -/home/resume
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? (Choose all that apply.)
-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.
You want to see the filesystems that are in use on the system. What command could you use? (Choose all that apply.)
-df -T -cat /etc/mtab
A device file _______________________. (Choose all that apply.)
-has no data section -display major minor number in place of file size
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.
When applied to a directory, the SGID special permission______________
. causes all new files created in the directory to have the same group membership as the directory and not the entity that created them
What will the following wildcard regular expression return: file[a-c]?
. filea, fileb, filec
Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command?/dev/sda1 / ext4 defaults 1 1none /dev/pts devpts gid=5,mode=620 1 0none /proc proc defaults 0 1none /dev/shm tmpfs defaults 1 0/dev/sdc2 swap swap defaults 0 1/dev/dvd /media/dvd iso9660 noauto,ro 0 0
/, /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
The tac command _________.
A Linux command that displays a file on the screen, beginning with the last line of the file and ending with the first line of the file.
You noticed a file in your home directory that has a + symbol appended to the mode. What does this indicate?
Additional entries exist within the ACL of the file that can be viewed using the getfacl command.
What component of a Linux server is used to connect to a Fibre Channel SAN?
FC HBA
What was created to define a standard directory structure and common file location for Linux?
FHS
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?
False
What does the mv command do
It moves a directory. It moves a file.
What must a user do to run cp or mv interactively and be asked whether to overwrite an existing file?
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?
Run chgrp again listing the root user as the new owner
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
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
After typing the ls -a command, you notice a file whose filename begins with a dot ( . ). What does this mean?
a hidden file
A user typed in the command pwd and saw the output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory?
cd ../..
If a user's current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root?
cd /etc
Which of the following commands will change the user ownership and group ownership of file1 to user1 and root, respectively?
chown user1:root file1
The vi editor can function in which two of the following modes? (Choose both that apply.)
command and insert
Which command is used to display the amount of free space that exists on a filesystem?
df
What does the command dumpe2fs -h do?
displays the number of used and available inodes for an ext2/ext3/ext4 filesystem
What does the du -s /var command do?
displays the total size of the /var directory
Which command is used to format a partition on a hard disk drive with the ext4 filesystem?
e2mkfs -t ext4 device
After typing the ls -F command, you notice a filename that ends with an * (asterisk) character. What does this mean?
executable file
What are the three standard Linux permissions?
execute, read, write
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?
false
After a partition on a hard disk is formatted with a filesystem, all partitions on that hard disk drive must use the same filesystem. True or False?
false
Character devices typically transfer data more quickly than block devices. True or False?
false
Only the root user can modify a file that has the immutable attribute set. True or False?
false
Which of the following commands can only be used to create partitions on a GPT hard disk?
gdisk
Which command mounts all existing filesystems in /etc/fstab?
mount -a
Which command do you use to rename files and directories?
mv
How can you specify a text pattern that must be at the beginning of a line of text using a regular expression?
precede with string with ^
The which command ____________
searches for a file only in directories that are in the PATH variable
What does the /var directory contain?
spools and log files
Which command searches for and displays any text contents of a binary file?
strings
When you change the data in a file that is hard-linked to three others, __________.
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
A user types the command head /poems/mary. What will be displayed on the terminal screen?
the first 10 lines of the file mary
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?
true
The lvextend command can be used to add unused space within a volume group to an existing logical volume. True or False?
true
Which command can be used to repair an XFS filesystem?
xfs_repair /dev/sdb1