UNIX操作系统 测试题
姓名 成绩
第一部分 选择题(每题2 分,共30分) 1、In order to append a standard output to an existing file, which of the following operators is used in the UNIX system?
A) | B) & C) >; D) >;>; 2、 若文件A的创建者希望对所有用户(包括其自身)可读写文件A但不可执行A,可用下列哪一个命令完成?
A) chown 777 A B) chown 566 A C) chmod 777 A D) chmod 566 A
3、 Which UNIX command creates a symbolic link named myfile in the current directory to the file/etc/hosts?
A) In -s /etc/hosts myfile B) In -s myfile /etc/hosts C) link -s /etc/hosts myfile D) link -s myfile /etc/hosts
4、下列关于UNIX的叙述中,正确的是
Ⅰ. UNIX内核控制计算机硬件,shell则是内核与用户之间的解释层。 Ⅱ. UNIX支持很多正文编辑器 Ⅲ. UNIX文件系统可以安装或拆卸
A) Ⅰ和Ⅱ B) Ⅰ和Ⅲ C) Ⅱ和Ⅲ D) Ⅰ,Ⅱ和Ⅲ
5、下列关于UNIX的叙述中,不正确的是
A) UNIX的文件系统是树型结构的,便于管理和检索
B) UNIX提供了丰富的软件工具,如实用程序、文本工具和开发工具 C) UNIX把普通文件、目录文件和设备文件分别以不同方式进行管理 D) UNIX是多用户、多任务的分时操作系统
6、在UNIX系统中,组成UNIX执行环境的是一系列 A) 环境变量 B) 管道 C) 特殊文件 D) 管理命令 7、Chang, Tian and An are three users of the system. Chang and An are in the same group. Tian is a Super User. Which of the following rights is inconsistent with the given policies? A) Tian has W(write) access to An's Mail files B) Tian has E(execute) access to An's Mail files C) Chian has R(read) access to An's text files
D) Tian has E(execute) access to Chang's Binary files
8、下列关于UNIX操作系统的叙述中,不正确的是
A) UNIX中点文件即是初始化文件,主要用于执行一些shell的配置命令。 B) UNIX中只有普通文件是无结构字符流文件
C) shell既表示一种程序设计语言,又表示一种命令解释程序
D) 输人输出重定向是把一个程序的标准输出与另一个程序的标准输入连接在一起
9、If you wanted to turn off mail notification, what command would you use? A)biff n B)mesg n C)mesg off D)notify off E)set notify=off 10、Which commands will give you information about how much disk space each file in the current directory uses?
A)ls -l B)du . C)ls -a D)ls
11、Having booted into run level 3, how would you change to run level 5 without rebooting? A)telinit 5 B)startx C)run 5 D)ALT-F7-5 E)setinit 5
12、What file is used for associating port numbers to port names. A)/etc/services B)/etc/hosts C)/etc/inetd.conf D)/etc/securetty E)/etc/ports
13、What command(s) do you use to create swap space?
A)mkswap B)activeswap C)swapon D)initswap E)mkfs -t swap
14、大多数UNIX网络基于________协议。 A)SPX B)IPX C)TCP/IP D)AppleTalk
15、下面UNIX版本不属于AT&T开发品种的是:
A)UNIX System Ⅲ B)UNIX System Ⅴ Release 1 C)UNIX System Ⅴ Release 4 D)System Ⅴ Release 5
第二部分 论述题(共70分)
1、 UNIX文件系统是如何分类的?为何这样分类?有什么好处?(6分)
2、 UNIX对目录的深度有限制吗?标准UNIX工具是如何处理长路径名的?对目录可以使用tar或cpio命令吗?(5分)
3、 如何在vi编辑器中显示特殊字符?(4分)
4、 例举两个重要变量PATH和TERM的使用方法及意义。(4分) 5、 UNIX启动系统时,登陆脚本的作用是什么?(4分) 6、 解释寻址方式,UNIX有几种寻址方式?(5分) 7、 请说明下列哪一项属于哪一类文件?(4分) A) drwxr-xr-x B) /bin
C) /etc/passwd D) brw-rw-rw- E) /dev/fd0 F) /usr/lib G) –rwx--x--x
8、 在/usr下建立你的目录,将who、echo、pwd命令的文档资料拷贝到你的目录下,从中找出大于5块的文件,并将它们从目录中删除。(5分) 9、 请列出终止打印队列中某一项任务的操作方法。(4分)
10、如何确定在某文件中是否包含表示有星期六、星期日字符的行?(4分) 11、解释下述vi命令有什么功能?(5分) 20G 18| dM 6H d4B x cw 10cc 3rk
5s 7S >8M /this ? abc? -5 mg g/int/p ”ap 12、UNIX如何进行进程调度?(6分) 13、分析下面shell脚本的功能:(4分) count=$# cmd=echo
while[ $count – gt0 ] do
cmd=”$cmd \\ $count” count=`expr $count - 1` done
eval $cmd
14、说明下述操作的功能与结果:(4分) $ cat students user1 user2
… usern $ cat fff
for NAME in $(cat students) do
cp kkk /home/$NAME
chown $NAME /home/$NAME/kkk echo done $NAME done $ ./fff
15、说明使用ftp命令与远程主机通信的过程、权限问题,并例举操作。(6分)
考试说明:
1、 自附纸张答题。 2、 请统一交卷。 3、 请认真阅答。
4、 个人想法或自我评定与要求可写到答题纸上。