DevFileHier Flashcards
After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the
filesystem. Which of the following describes the resulting situation?
A.
foo and bar would both be removed.
B.
foo would be removed while bar would remain accessible.
C.
foo would be removed. bar would still exist but would be unusable.
D.
Both foo and bar would remain accessible.
foo would be removed while bar would remain accessible.
After moving data to a new filesystem, how can the former path of the data be kept intact in order
to avoid reconfiguration of existing applications? (Choose TWO correct answers.)
A.
By creating an ACL redirection from the old to the new path of the data.
B.
By creating a hard link from the old to the new path of the data.
C.
By creating a symbolic link from the old to the new path of the data.
D.
By running the command touch on the old path.
E.
By mounting the new filesystem on the original path of the data.
By creating a symbolic link from the old to the new path of the data.
By mounting the new filesystem on the original path of the data.
Which of the following commands changes the ownership of file.txt to the user dan and the group staff? A. chown dan/staff file.txt B. chown dan:staff file.txt C. chown -u dan -g staff file.txt D. chown dan -g staff file.txt
chown dan:staff file.txt
Which of the following commands makes /bin/foo executable by everyone but writable only by its owner? A. chmod u=rwx,go=rx /bin/foo B. chmod o+rwx,a+rx /bin/foo C. chmod 577 /bin/foo D. chmod 775 /bin/foo
chmod u=rwx,go=rx /bin/foo
Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH? A. apropos B. which C. find D. query E. whereis
find
What does the command mount -a do?
A.
It ensures that all file systems listed with the option noauto in /etc/fstab are mounted.
B.
It shows all mounted file systems that have been automatically mounted.
C.
It opens an editor with root privileges and loads /etc/fstab for editing.
D.
It ensures that all file systems listed with the option auto in /etc/fstab are mounted.
E.
It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.
It ensures that all file systems listed with the option auto in /etc/fstab are mounted.
Which of the following settings for umask ensures that new files have the default permissions -rwr----- ? A. 0017 B. 0640 C. 0038 D. 0027
0027
Which of the following is the device file name for the second partition on the only SCSI drive? A. /dev/hda1 B. /dev/sda2 C. /dev/sd0a2 D. /dev/sd1p2
/dev/sda2
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.) A. cat /proc/self/mounts B. free C. mount D. lsmounts E. cat /proc/filesystems
cat /proc/self/mounts
mount
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files? A. dirname B. which C. basename D. query E. whereis
whereis
Which of the following commands changes the number of days before the ext3 filesystem on
/dev/sda1 has to run through a full filesystem check while booting?
A. tune2fs -d 200 /dev/sda1 B. tune2fs -c 200 /dev/sda1 C. tune2fs -i 200 /dev/sda1 D. tune2fs -n 200 /dev/sda1 E. tune2fs --days 200 /dev/sda1
tune2fs -i 200 /dev/sda1
Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters?A. ext2 B. ext3 C. ext4 D. XFS E. VFAT
ext2
How many fields are in a syntactically correct line of /etc/fstab? A. 3 B. 4 C. 5 D. 6 E. 7
6
Which command is used to create and initialize the files used to store quota information? (Specify
ONLY the command without any path or parameters.)
quotacheck
Which of the following file permissions belong to a symbolic link? A. -rwxrwxrwx B. \+rwxrwxrwx C. lrwxrwxrwx D. srwxrwxrwx
lrwxrwxrwx
Creating a hard link to an ordinary file returns an error. What could be the reason for this? A. The source file is hidden. B. The source file is read-only. C. The source file is a shell script. D. The source file is already a hard link. E. The source and the target are on different filesystems
The source and the target are on different filesystems.
Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.) A. /sbin/mke2fs -j /dev/sdb1 B. /sbin/mkfs -t ext3 /dev/sdb1 C. /sbin/mkfs -c ext3 /dev/sdb1 D. /sbin/mke3fs -j /dev/sdb1
/sbin/mke2fs -j /dev/sdb1
/sbin/mkfs -t ext3 /dev/sdb1
Which of the following commands will change the quota for a specific user? A. edquota B. repquota C. quota -e D. quota
edquota
Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that fileysstem? A. mod2fs B. fsck C. tune2fs D. mke2fs E. fixe2fs
tune2fs
Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.) A. ext3 B. JFS C. ext2 D. XFS E. procfs
ext3
ext2
What is the purpose of the Filesystem Hierarchy Standard?
A.
It is a security model used to ensure files are organized according to their permissions and
accessibility.
B.
It provides unified tools to create, maintain and manage multiple filesystems in a common way.
C.
It defines a common internal structure of inodes for all compliant filesystems.
D.
It is a distribution neutral description of locations of files and directories.
It is a distribution neutral description of locations of files and directories.
Which umask value will result in the default access permissions of 600 (rw——-) for files and 700
(rwx——) for directories? (Specify only the numerical umask value.)
0077, 077
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used
to identify the intended partition? (Choose TWO correct answers.)
LABEL
UUID
After running the command umount /mnt, the following error message is displayed:
umount: /mnt: device is busy.
What is a common reason for this message?A.
The kernel has not finished flushing disk writes to the mounted device.
B.
A user has a file open in the /mnt directory.
C.
Another file system still contains a symlink to a file inside /mnt.
D.
The files in /mnt have been scanned and added to the locate database.
E.
The kernel thinks that a process is about to open a file in /mnt for reading
A user has a file open in the /mnt directory.
What does the command mount -a do?
C.
It mounts all user mountable filesystems for the current user.
D.
It mounts all filesystems listed in /etc/fstab which have the option auto set.
E.
It mounts all filesystems listed in /etc/fstab which have the option noauto set.
It mounts all filesystems listed in /etc/fstab which have the option auto set.
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.) A. chmod +s /tmp B. chmod +t /tmp C. chmod 1775 /tmp D. chmod 4775 /tmp E. chmod 2775 /tmp
chmod +t /tmp
chmod 1775 /tmp
Which of the following commands can be used to display the inode number of a given file? A. inode B. ls
ls
Which of the following commands shows the definition of a given shell command? A. where B. stat C. type D. case
type
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
A.
The command is SetUID and it will be executed with the effective rights of the owner.
B.
The command will be executed with the effective rights of the group instead of the owner.
C.
The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
D.
The command will be executed with the effective rights of the owner and group.
The execute flag is not set for the owner. Therefore the SetUID flag is ignored.
Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created? A. File size B. Modify timestamp C. Link count D. Inode number E. Permissions
Link count