设为首页 加入收藏

TOP

Unix英文面试题
2014-11-05 10:15:05 来源: 作者: 【 】 浏览:30
Tags:Unix 英文 试题


Chapter 2


1.What are the two major UNIX system versions


Answer: AT & T UNIX version V, Berkeley UNIX



2.What is the kernel


Answer: the UINX kernel, also called the base operating system, is the layer that manages all the hardware-dependent functions.



3.What is a shell


Answer: shell is a powerful command interpreter, which control the user’s interaction with UINX.



4.Briefly explain the virtual computer concept.


Answer: Virtual compute is an execution environment that consists of a terminal for user interface and shared access to the other computer resources such as memory, disk drivers, CPU etc. UNIX, a multiuser operating system is implemented as a collection fo virtual computers. To the users, it appears that each of them has his or her own private pseudocomputer.



10.Name some of the UNIX variants.


Answer: Linux, Solaris, UnixWare.



Chapter 3


7. What sort of information does the man command provide


Answer: the man command provide detailed information about command usage and options.



8. What is the general format of a UNIX command


Answer: the command line format:




13. Name the different types if UNIX shells. What are the prompt signs for UNIX shells


Answer: Bourne Shell(the sign is $), Korn Shell(the sign is $), C Shell(the sign is %), Bourne Again Shell(the sign is $).



14. What are the shell commands


Answer: shell commands are part of the shell program, these built-in commands are recognized by the shell and are executed internally.



15. What are the utility programs


Answer: utility programs s are executable programs that the shell locates and executes.



Chapter 4


4. Name the vi modes


Answer: command mode,text input mode



5. Name the keys that place the vi editor in the text input mode


Answer: I,i,O,o,A,a



7. Name the command that saves your files and quits the vi editor.


Answer: :wq or ZZ



8. Name the command that just saves your file and remains in the vi editor.


Answer: :w



9. Name the key that places the vi editor in the command mode


Answer:[ESC]



10. Name the operator that deletes one line of text and the operator that deletes five lines of text.


Answer: dd, 5dd



11.Name the operator that deletes a character and the operator that deletes 10 characters.


Answer: x, 10x



12. Name the key that repeats your most recent text change.


Answer: .(dot)



13. Name the key that moves the cursor position to the end of the current line.


Answer: $



14. Name the key that moves the cursor position forward one word.


Answer: w



15. Name the cursor movement keys that move the cursor up, down, left, and right.


Answer: k, j, h, l



16. Name the key that appends the text you enter to the end of the current line.


Answer: A



17. Name the key that opens a line above the current line.


Answer: O



18. Name the key that opens a line below the current line.


Answer: o



19. Name the key that undoes the most recent changes.


Answer: u



20. Name the key that undoes all the changes on the current line.


Answer: U



Chapter 5


5.



6.


Absolute pathname: b


Relative pathname: c d


Filename: a e f



7.



9.



Chapter 6


1.


vi -R xyz



4.


The vi editor uses nine buffers numbered from 1-9 to store text that is deleted or yanked during the editing job. Data stored in the buffers can be accessed by their assigned numbers. Data in the first buffer holds the latest changes and each new change of text will be stored in buffer 1 and the content of all buffers will move down. The content of buffer number 9, if any, will be lost. (Section6.4.1)



6.


a: dd


b: dw


c: yy


d: yw


e: d$


f: “z2yy


g: “zp


h: “2p



9.


The .exrc file is used to tailor the vi environment. The commands and parameters that affect the vi environment, and you want to be available when using the vi editor, are typed in this file. The content of this file will be executed when vi is invoked.



10.


:!date


11.


:r date



13.


The vi editor recovery option is -r that is used in a command line such as: vi -r filename



14.


You use the vi editor –r option without filename to get the list of the files that were saved. The command line will be: vi -r



16.



Chapter 7


1.


The >, >> sign is for output redirection, and the <, << sign is for input redirection.



3.


You can read a file using the cat command, vi editor with the R option, or the more command to read your file.



5.


The mv command is used to rename a file.



7.


A UNIX disk consists of the following regions: (Refer to the text for more details.)
- The boot block: Where the boot block program is stored
- The super block: Where information about the disk itself (such
as number of used and free blocks) is stored
- The i list block: Where the list of i nodes is stored



10.


mv file1 file2 =>> i node remains the same
cp file1 file2 =>> new i node is created
ln file1 file2 =>> i node remains the same



11.


find / name filename exec rm {}\;



12.


tail filename
(by default tail shows the last 10 lines)



15.


The more command. For example: more filename



17.


ls *end



20.


cp [Aa]*[Zz] Keep



Chapter 8


6.


The set command.



7.


The unset command



10.


The & sign is the background operator. A command that is followed by the & sign is sent to the background for execution



11.


The kill command with the process ID of the background program you intend to terminate.



13.


The pip operator (vertical line [ | ] ) is a UNIX operator that directs the output of one program to be the input to another.



14.


You use the nohup command. You begin the command line with nohup, and type the rest of the command line.



15.


The grep command



16.


You use the sleep command.



17.


The parenthesis. Example: $ (date ; who ; pwd )



28.


alias



29.


export variable -name, variable-name ..



31.


ls | tee filename



Chapter 11


1.


You can use the sh command or the shell script filename, if it is an executable file.



2.


The chmod command. For example chmod u+ x myshell changes the access code of myshell to the executable.



4.


The read command. For example read xyz reads from the keyboard and stores the input in the xyz variable.



8.


Using the shell program (sh) options x and v.



13.


expr



15.


expr x \* y



18.


chmod a=rwx xyz



27.


Each comment line starts with a # sign.



Chapter 12


1.


The trap command is used to change the process reaction to the signals it receives.



4.


The stty command



8.


stty sane



Chapter 13


8.


The at command. Example: at 1530 Wed ; sort bigfile



10.


The tar command is used to archive files or transport files from one system to another. It copies a set of files into a single file that can be save on any disk media.



11.


The tarfile is a file created when the tar command is used.



13.


tar -t save.tar



Terminal Session


Chapter 11


6.


#accept numbers passed from arguments on the command line,and sums them to display the #result.


if [ $# = 0 ]


then


echo “Error! Please specify at least one number as arguments on command line.”


exit 0


fi


sum=


msg=


n=


for i in $@


do


let n=n+1


let sum=sum+i


if [ $n -le 1 ]


then


msg=$i


else


msg=$msg+$i


fi


done


echo “$msg = $sum”



9


#Accept three numbers from from arguments on the command line and shows the largest one of #them


if test $# = 3


then


if test “$1″ -gt “$2″ -a “$1″ -gt “$3″


then


echo “The largest number is: $1″


elif test “$2″ -gt “$1″ -a “$2″ -gt “$3″


then


echo “The largest number is: $2″


else


echo “The largest number is: $3″


fi


else


echo “Error! Please specify three numbers as arguments on command line.”


exit 0


fi


echo “Done! ”



Chapter 12


10


See p377 figure 12.7


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇java工程师 2年工作经验 下一篇Java Web开发面试题一套(3)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: