100% found this document useful (1 vote)
563 views5 pages

Chapter-2 (File Management)

The document provides answers to multiple choice questions about Linux directory structures and commands. It addresses topics such as the directory for installing third party programs (/opt), using the ls command to view directory metadata without file contents (-d option), and commands for copying, renaming, deleting, and navigating files and directories.

Uploaded by

Kyar Nyo Aye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
563 views5 pages

Chapter-2 (File Management)

The document provides answers to multiple choice questions about Linux directory structures and commands. It addresses topics such as the directory for installing third party programs (/opt), using the ls command to view directory metadata without file contents (-d option), and commands for copying, renaming, deleting, and navigating files and directories.

Uploaded by

Kyar Nyo Aye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

What directory does the Linux FHS set aside specifically for installing third party

programs?
A. /usr/bin
B. /usr
C. /opt
D. /usr/sbin
E. /tmp
ANSWER: C

You are looking at a directory that you have not viewed in a long time and need to
determine which files are actually directories. Which command is the best one to
use?
A. mkdir -v
B. ls
C. ls -F
D. ls -i
E. ll
ANSWER: C

You are using the ls command to look at a directory file’s metadata but keep seeing
metadata for the files within it instead. What command option will rectify this
situation?
A. -a
B. -d
C. -F
D. -l
E. -R
ANSWER: B

You have just created an empty directory called MyDir. Which command most likely
did you use?
A. mkdir -v MyDir
B. touch MyDir
C. cp -R TheDir MyDir
D. mv -r TheDir MyDir
E. rmdir MyDir
ANSWER: A

A long-time server administrator has left the company, and now you are in charge of
her system. Her old user account directory tree, /home/Zoe/, has been backed up.
Which command is the best one to use to quickly remove her files?
A. cp -R /home/Zoe/ /dev/null/
B. mv -R /home/zoe/ /dev/null/
C. rm -Rf /home/Zoe/
D. rm -ri /home/Zoe/
E. rm -rI /home/Zoe
ANSWER: E

Which directory contains the system kernel?


A. /etc
B. /
C. /boot
D. /proc
ANSWER: C

Which directory contains static, persistent system configuration data?


A. /etc
B. /
C. /boot
D. /proc
ANSWER: A

Which of the following is the system's root directory?


A. /etc
B. /
C. /boot
D. /proc
ANSWER: B

Which directory contains dynamic configuration data, such as FTP and websites?
A. /var
B. /usr
C. /tmp
D. /run
ANSWER: A

Which directory contains dynamic, non-persistent application runtime data?


A. /var
B. /usr
C. /tmp
D. /run
ANSWER: D

Which directory contains installed software programs and libraries?


A. /var
B. /usr
C. /tmp
D. /run
ANSWER: B

Which directory contains the root user’s home directory?


A. /home
B. /sbin
C. /root
D. /usr
ANSWER: C

The /dev directory contains the


A. device drivers
B. device files
C. kernel modules of device drivers
D. none of the above
ANSWER: B

Regular user commands and utilities are stored in


A. /dev
B. /usr/bin
C. /usr/sbin
D. /tmp
ANSWER: B

System administration binaries, for root use, are stored in


A. /dev
B. /usr/bin
C. /usr/sbin
D. /tmp
ANSWER: C
User home directories are located under this directory.
A. /home
B. /sbin
C. /root
D. /usr
ANSWER: A

Under which directory would you expect to find nonessential program files?
A. /boot
B. /bin
C. /sbin
D. /usr
ANSWER: D

Under which directory would you expect to find log files?


A. /proc
B. /run
C. /var
D. /usr
ANSWER: C

Which command enables you to show all files in the current directory so that the
newest files are listed last?
A. ls -lRt
B. ls -lrt
C. ls -alrt
D. ls -alr
ANSWER: C

Which command enables you to copy hidden files as well as regular files from /home/
$USER to the current directory?
A. cp -a /home/$USER .
B. cp -a /home/$USER/* .
C. cp -a /home/$USER/. .
D. cp -a home/$USER. .
ANSWER: C

Which command enables you to rename the file myfile to mynewfile?


A. mv myfile mynewfile
B. rm myfile mynewfile
C. rn myfile mynewfile
D. ren myfile mynewfile
ANSWER: A

The _________ command displays the full path name of the current location.
A. cd
B. ls
C. pwd
D. touch
ANSWER: C

A/An _________ is a fully qualified name, beginning at the root (/) directory and
specifying each subdirectory traversed to reach and uniquely represent a single
file.
A. absolute path
B. relative path
C. pwd
D. none of the above
ANSWER: A
A/An _________ identifies a unique file, specifying only the path necessary to
reach the file from the working directory.
A. absolute path
B. relative path
C. pwd
D. none of the above
ANSWER: B

Which command enables you to list the current user's home directory (long format)
in simplest syntax, when it is not the current location.
A. ls -l ~
B. ls -al
C. ls -cl
D. ls -il
ANSWER: A

Which command enables you to list the current location (long format) with hidden
files.
A. ls -l ~
B. ls -al
C. ls -cl
D. ls -il
ANSWER: B

Which command enables you to show the contents of the current directory, in
addition to all of its subdirectories.
A. ls -l
B. ls -a
C. ls -d
D. ls -R
ANSWER: D

Which command enables you to return to the current user's home directory.
A. cd -
B. cd ..
C. cd ../..
D. cd
ANSWER: D

Which command enables you to return to the most previous working directory.
A. cd -
B. cd ..
C. cd ../..
D. cd
ANSWER: A

Which command enables you to move up two levels from the current location.
A. cd -
B. cd ..
C. cd ../..
D. cd
ANSWER: C

Which command enables you to move up to the parent of the current location.
A. cd -
B. cd ..
C. cd ../..
D. cd
ANSWER: B

Which command enables you to move to the binaries location, from any current
location.
A. cd /bin
B. cd bin
C. cd
D. cd .
ANSWER: A

Which command enables you to move to the binaries location, from the root
directory.
A. cd /bin
B. cd bin
C. cd
D. cd .
ANSWER: B

The _________ command renames files in the same directory, or relocates files to a
new directory.
A. ren
B. rm
C. rn
D. mv
ANSWER: D

What command enables you to display a list of current directory contents, where the
newest files are listed first?
A. ls -lRt
B. ls -lrt
C. ls -alrt
D. ls -alt
ANSWER: D

Which command enables you to wipe an entire directory structure, including all of
its contents?
A. rm -i /directory
B. rm -d /directory
C. rm -rf /directory
D. rm /directory
ANSWER: C

How would you copy all files that have a name that starts with a, b, or c from the
directory /etc to your current directory?
A. cp /etc/[abc]* .
B. cp /etc/[abc]? .
C. cp /etc/[abc]? ~
D. cp /etc/[abc]* ~
ANSWER: A

You might also like