Chapter 3 Exams Flashcards
Which directory contains persistent, system-specific configuration data?
A
/etc
B
/root
C
/run
D
/usr
A
/etc
Which directory is the top of the system’s file system hierarchy?
A
/etc
B
/
C
/home/root
D
/root
B
/
Which directory contains user home directories?
A
/
B
/home
C
/root
D
/user
B
/home
Which directory contains temporary files?
A
/tmp
B
/trash
C
/run
D
/var
A
/tmp
Which directory contains dynamic data, such as for databases and websites?
A
/etc
B
/run
C
/usr
D
/var
D
/var
Which directory is the administrative superuser’s home directory?
A
/etc
B
/
C
/home/root
D
/root
D
/root
Which directory contains regular commands and utilities?
A
/commands
B
/run
C
/usr/bin
D
/usr/sbin
C
/usr/bin
Which directory contains non-persistent process runtime data?
A
/tmp
B
/etc
C
/run
D
/var
C
/run
Which directory contains installed software programs and libraries?
A
/etc
B
/lib
C
/usr
D
/var
C
/usr
Which command is used to return to the current user’s home directory, assuming the current working directory is /tmp and their home directory is /home/user?
A
cd
B
cd ..
C
cd .
D
cd *
E
cd /home
A
cd
Which command displays the absolute path name of the current location?
A
cd
B
pwd
C
ls ~
D
ls -d
B
pwd
Which command will always return you to the working directory used prior to the current working directory?
A
cd -
B
cd -p
C
cd ~
D
cd ..
A
cd -
Which command will always change the working directory up two levels from the current location?
A
cd ~
B
cd ../
C
cd ../..
D
cd -u2
C
cd ../..
Which command lists files in the current location, using a long format, and including hidden files?
A
llong ~
B
ls -a
C
ls -l
D
ls -al
D
ls -al
Which command will always change the working directory to /bin?
A
cd bin
B
cd /bin
C
cd ~bin
D
cd -bin
B
cd /bin
Which command will always change the working directory to the parent of the current location?
A
cd ~
B
cd ..
C
cd ../..
D
cd -u1
B
cd ..
Which command will change the working directory to /tmp if the current working directory is /home/student?
A
cd tmp
B
cd ..
C
cd ../../tmp
D
cd ~tmp
C
cd ../../tmp
Which pattern will match only filenames ending with “b”?
A
b*
B
*b
C
b
D
[!b]*
B
*b
Which pattern will match only filenames beginning with “b”?
A
b*
B
*b
C
b
D
[!b]*
A
b*
Which pattern will match only filenames where the first character is not “b”?
A
b*
B
*b
C
b
D
[!b]*
D
[!b]*
Which pattern will match all filenames containing a “b”?
A
b*
B
*b
C
b
D
[!b]*
C
b
Which pattern will match only filenames that contain a number?
A
#
B
[[:digit:]]
C
[digit]
D
[0-9]
B
[[:digit:]]
Which pattern will match only filenames that begin with an uppercase letter?
A
^?*
B
^*
C
[upper]*
D
[[:upper:]]*
E
[[CAP]]*
D
[[:upper:]]*
Which pattern will match only filenames at least three characters in length?
A
???*
B
???
C
\3*
D
+++*
E
…*
A
???*