80 EXAM WITH ACTUAL QUESTIONS
AND ANSWERS
, Which command displays file names only and no additional information?
A. ls -a
B. ls -lh
C. ls -l
D. ls -alh
E. ls -nl - ANSWERA
What is the purpose of the PATH environment variable?
A. It allows the execution of commands without the need to know the location of the
executable.
B. It increases security by preventing commands from running in certain locations.
C. It specifies the location of a user's home directory.
D. It indicates the location of the default shell to be used when a user logs in.
E. It contains the absolute path to the current directory. - ANSWERA
Which of the following commands sets the variable USERNAME to the value bob?
A. set USERNAME bob
B. $USERNAME==bob
C. var USERNAME=bob
D. USERNAME<=bob
E. USERNAME=bob - ANSWERE
Which of the following statements are true regarding a typical shell script? (Choose
two.)
A. It has the executable permission bit set.
B. It starts with the two character sequence #!.
C. It is located in /usr/local/scripts/.
D. It is located in /etc/bash/scripts/.
E. It is compiled into a binary file compatible with the current machine architecture. -
ANSWERAB
Which of the following commands extracts the contents of the compressed archive
file1.tar.gz?
A. tar -czf file1.tar.gz
B. ztar file1.tar.gz
C. tar -xzf file1.tar.gz
D. tar --extract file1.tar.gz
E. detar file1.tar.gz - ANSWERC
The file script.sh in the current directory contains the following content:#!/bin/bashecho
$MYVARThe following commands are used to execute this script:MYVAR=value