DevFileHier Flashcards

1
Q

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.

A

foo would be removed while bar would remain accessible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
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
A

chown dan:staff file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
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
A

chmod u=rwx,go=rx /bin/foo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
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
A

find

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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.

A

It ensures that all file systems listed with the option auto in /etc/fstab are mounted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
Which of the following settings for umask ensures that new files have the default permissions -rwr-----
?
A.
0017
B.
0640
C.
0038
D.
0027
A

0027

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
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
A

/dev/sda2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
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
A

cat /proc/self/mounts

mount

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
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
A

whereis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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
A

tune2fs -i 200 /dev/sda1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
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
A

ext2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
How many fields are in a syntactically correct line of /etc/fstab?
A.
3
B.
4
C.
5
D.
6
E.
7
A

6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which command is used to create and initialize the files used to store quota information? (Specify
ONLY the command without any path or parameters.)

A

quotacheck

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
Which of the following file permissions belong to a symbolic link?
A.
-rwxrwxrwx
B.
\+rwxrwxrwx
C.
lrwxrwxrwx
D.
srwxrwxrwx
A

lrwxrwxrwx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
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
A

The source and the target are on different filesystems.

17
Q
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
A

/sbin/mke2fs -j /dev/sdb1

/sbin/mkfs -t ext3 /dev/sdb1

18
Q
Which of the following commands will change the quota for a specific user?
A.
edquota
B.
repquota
C.
quota -e
D.
quota
A

edquota

19
Q
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
A

tune2fs

20
Q
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
A

ext3

ext2

21
Q

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.

A

It is a distribution neutral description of locations of files and directories.

22
Q

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.)

A

0077, 077

23
Q

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.)

A

LABEL

UUID

24
Q

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

A user has a file open in the /mnt directory.

25
Q

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.

A

It mounts all filesystems listed in /etc/fstab which have the option auto set.

26
Q
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
A

chmod +t /tmp

chmod 1775 /tmp

27
Q
Which of the following commands can be used to display the inode number of a given file?
A.
inode
B.
ls
A

ls

28
Q
Which of the following commands shows the definition of a given shell command?
A.
where
B.
stat
C.
type
D.
case
A

type

29
Q

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.

A

The execute flag is not set for the owner. Therefore the SetUID flag is ignored.

30
Q
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
A

Link count