Вы находитесь на странице: 1из 4

Use the following output from the history command to answer the following 2 questions.

Assume that the mentioned expressions are typed on the command line immediately following the history command. Note that over 70 lines have been omitted from the output.
[student@station student]$ history 1 gimp rdu_map.png 2 bg 3 scp rdu_map.png @nimbus.example.com:/ ar/!!!/html/maps ... "1 gaim# "2 e olution# "3 ps aux $ grepel is "% p&illoa'd "( ps aux $ grepel is ") pgrep *u el is "+ pgrep *ulel is "" pgrep **help ", pgrep *luel is ,- e olution# ,1 history
Top of Form

rha030_bash_tes

. !n the following command line" what would be substituted for the expression ..# A. e olution # B. gimp rdu_map.png

C. prep *luel is D. history E. $he answer cannot be determined from the information given.

rha030_bash_tes

2. !n the following command line" what would be substituted for the expression .s# A. B. C. D. E. scp rdu_map.png @nimbus.example.com:/ ar/!!!/html/maps p&illoa'd pgrep *luel is $he answer cannot be determined from the information given. $he question is misguided" because .s is not a legitimate expression for history expansion.

rha030_bash_tes

%. &n which file is a user's command history stored between bash sessions# A. //.history B.
/tmp/.history_username"

with username replaced with the user's name.

C. //.bash_history D. (hichever file the 0123_3425678_94:; variable specifies. E. None of the above

rha030_bash_tes

).

(hich of the following commands would display *only+ the contents of the :1<= environment variable# A. echo $:1<= B.
echo $>:1<=?

C. A and , D. echo en iron $:1<= E. All of the above

rha030_bash_tes

-.

(hich of the following commands would change a bash shell's wor.ing directory to a user's home directory# A. cd B.
cd /

C. A and , D. cd @Aecho $36B;C@ E. All of the above

&n the following transcript" the user is trying to enable the nocaseglob shell option" but failing.
[student@station student]$ shoptnocaseglob nocaseglob o'' [student@station student]$ Ashopt *s nocaseglobD set E'C [student@station student]$ shoptnocaseglob nocaseglob o''

rha030_bash_tes

/. (hy was the nocaseglob shell option not modified by the shoptbuiltin command# A. B. C. D. E. $he nocaseglob option was enabled" but it was enabled in a subshell. $he original shell's shell nocaseglob option was not modified. $he wrong syntax for the shopt command was used. $he correct syntax would be shopt Enocaseglob. $he nocaseglob option was enabled" but then immediately disabled by the following set command. $he wrong syntax for the shopt command was used. $he correct syntax would be shopt *nocaseglob. None of the above

rha030_bash_tes

7.

(hich of the following command lines would add the /usr/games directory to the current shell's search path for executable files# A. F153G$F153:/usr/games B.
F153G/usr/games

C. F153EG/usr/games D. AF153G$F153:/usr/gamesC E. None of the above

Use the following transcript to answer the next question.


[student@station student]$ ps F4H 558 54B; IBH ,123 pts/3 --:--:-- bash ,2,+ pts/3 --:--:-- ps [student@station student]$ echo $$ $J $K2;7 $_
rha030_bash_tes

0. (hat would the output of the last command loo. li.e# A. ,2,+ 1 student echo B. ,123 - student ps

C. ,123 - /home/student ps D. $here is enough information provided" but none of the above answers are correct.

E.

$here is not enough information provided to answer this question.

Use the following transcript to answer the next question.


[student@station [student@station [student@station [student@station [student@station
rha030_bash_tes

student]$ student]$ student]$ student]$ student]$

1Gaard ar& export 0Gbro!n bear export IGcamel bash echo L1G$1L M0G$0M @IG$I@

1. (hat output did the echo command generate# A. 1Gaard ar& 0Gbro!n bear IGcamel B. 1G$1 0GMbro!n bearM IGcamel

C. 1G$1 0Gbro!n D. 1G 0Gbro!n IG$I E. 1Gaard ar& 0Gbro!n IG$I

A bash command line produces the following output.


dr!xr!xr!t it !or&ed
rha030_bash_tes

31 root

root

%-,) 2ep % 1):-- /tmp

0. (hich of the following command lines could have produced the output above# A. Als *ld /tmp $$ echo Mit !or&edMC B.
ls *ld /tmp## echo Mit !or&edM

C. A and , D. ls *ld /tmp E echo Mit !or&edM E. All of the above


Bottom of Form

Вам также может понравиться