题目出自LPI102考题,第一个全答对的朋友奖励棒球帽一个,大家可以直接跟贴。如果对获得的奖励采取保留,那将累计奖品,计算入年度大奖,具体大奖是什么,反正不会失望。嘿嘿。
shell的题目
1、Which of the following is the best way to list all defined shell variables? A. env
B. set
C. env -a
D. echo $ENV
2、You create a script named "/tmp/src" that runs under the bash shell. When you try to invoke it by typing "/tmp/scr", you get an error message saying "bash: /tmp/src: Permission denied". What could be wrong? Select the best response.
A. The script file was probably deleted by another user
B. The path for the bash shell is wrong in the first line
C. The permissions on the script file deny execute access
D. The script should be moved to the user’s home directory
E. Users are not allowed to execute scripts from the /tmp directory
3、What is described by the PS1 and PS2 environment variable?
A. Postscript Level 1 and Level 2 capabilities
B. Shortcuts for the commands "ps" and "ps uax"
C. The different levels for the Power Save Mode
D. The normal prompt and the following prompt of the shell
E. PS2 is a link to the mouse-port of a ps/2 mouse, PS1 doesn't exist
4、Which of the statements is the result of the following command? export PS2=”[\u\w]\\$ ”
A. The primary bash prompt uses underlining and white background (black foreground)
B. The primary bash prompt includes the username and working path
C. The secondary bash prompt terminal prompt uses underlining and white background (black foreground)
D. The secondary bash prompt includes the username and working path
E. The bash prompt maps mouse button one as Ctrl-U (undo) and mouse two as Ctrl-W (write line to file)
5、What is the correct first line of any bash shell script?
A. #!/bin/bash
B. #!
C. /bin/bash
D. /#!/bin/bash
E. #
6、The very first line of a bash shell script should always contain what two characters at the beginning of the line?
7、You are looking into a new script you received from your senior administrator. In the very first line you notice a #! followed by a path to a binary. The shell will:
A. ignore the script.
B. use that binary to interpret the script.
C. use that binary to compile the script.
D. be replaced by that binary.
8、You find you execute a series of commands on a recurring basis. You want this series of commands available from your login to run in the current shell. Choose the best solution.
A. create a shell program
B. create a function
C. use the up arrow in BASH to find the command
D. use BASH’s built-in function to run the last iteration of the command by the same name
9、Jack wants to protect himself from inadvertently overwriting files when copying them, so he wants to alias cp to prevent overview.
A. Put alias cp = ‘cp -i’ in ~/.bashrc
B. Put alias cp = ‘cp -i’ in ~/.bash_profile
C. Put alias cp = ‘cp -I’ in ~/.bashrc D. Put alias cp = ‘cp -p’ in ~/.bashrc Answer: A
10、You are frequently deleting the wrong files, what could you do to prevent this?
A. Use cp instead of rm
B. Use mv instead of rm
C. Use delete instead of rm
D. Alias rm to rm -i
duoduo_cn 于 2014-10-24 13:39:25发表:
这个贴目的是干啥用的
tyfisch_cn 于 2010-10-19 00:00:29发表:
哎,全英文的,看不懂啊!
为什么不用德语????
halazi100 于 2010-08-05 02:16:36发表:
迷茫~~
zcf115 于 2010-06-24 19:58:31发表:
晕啊,答错了。
zcf115 于 2010-06-24 19:57:45发表:
我只知道2题选E
xpelinux 于 2010-06-15 13:58:35发表:
高人!
shentu 于 2010-06-10 11:47:18发表:
飘过。。
firice 于 2010-01-11 17:25:20发表:
鄙视我英语没过四级阿:0w223dc
testingb 于 2010-01-11 14:42:47发表:
不错
yuchao668 于 2010-01-09 11:14:01发表:
3# linuxcui
嘿嘿,题目没错,只能说明我的水平还不够好,还得继续努力。
yuchao668 于 2010-01-09 11:11:55发表:
唉遗憾。。。。
这几天也在复习,下周就考试,祝大家都考个好成绩。
绿色圣光 于 2010-01-08 21:46:04发表:
汗,来晚了……
最近期末考试。时间不充裕啊……
shufeng 于 2010-01-08 18:18:02发表:
来学习一下
linuxcui 于 2010-01-08 16:38:26发表:
本周进行有奖水平测试三次,两次都被完全答对!其中一人还未与我联系,请尽快回复我发给您的短消息。
本期答案是:
[hide]1: B
2: C
3: D
4: D
5: A
6: #!
7: B
8: B
9: A
10: D[/hide]
linuxcui 于 2010-01-08 16:37:11发表:
周五啦,没人答题我可放答案啦~~
linuxcui 于 2010-01-08 16:37:10发表:
周五啦,没人答题我可放答案啦~~
linuxcui 于 2010-01-08 15:00:21发表:
2# yuchao668
楼层,和标准答案对比后有错误,遗憾哈~~
当然万一我的题目出错了内?也有可能,嘿嘿
yuchao668 于 2010-01-08 13:49:41发表:
[hide]1: B
2: C
3: D
4: D
5: A
6: #!
7: B
8: A
9: A
10: D[/hide]