
- H; U/ m3 v" S1 E1.所有输出重定向用以下哪个符号表示?( D )
( ]1 Y4 U8 U% s) }+ rA.>3 u9 e+ y1 n0 U! J
B.2>1 m# k$ y; {4 @7 t! d
C.&< g" m+ |% J$ X# N7 @4 \- j {- U
D.&>2 P9 [. h0 G1 i% S9 D. U( B7 \
9 m' I% c1 r, T! e
2.把错误输出重定向到一个文件的命令是?( C )
8 z8 t ]& G( BA.find /etc –name passwd > find.out
# Z/ f' T0 a! w- ^# @* R' NB.find /etc –name passwd 2> /dev/null. _! {5 Y+ g% T" `( v/ `& L
C.find /etc –name passwd >find.out 2> find.err& N$ y j. _$ \0 N5 D
D.find /etc –name passwd &> find.all
2 U# I$ W, D5 V% k2 h* ^
% [8 f( Z: W! \; O3.能实现给user发送邮件的命令是?( B )
% y+ G$ P) ^/ v: E) d# XA.echo “test email”|mail “test” user@example.com
% @" ~. g& [$ P; V7 aB.echo “test email”|mail –s “test” user@example.com
* W$ L* V1 ?( z3 @' \9 l" f, s" R5 vC.echo “test email”|mail “test” user@example.com
* C/ h1 R% Y) d: I& a' MD.mail -s “test” user@example.com
/ f5 A a" j8 s, w/ \: M5 `
+ W: L& t1 O! g/ m: X4 X4 R4.在命令行提示符下,删除光标所在的位置到行首的命令是?( B )+ n( O: T2 ~; f/ V3 }
A.ctrl+a$ i% C1 ]# T" N( f/ U: T
B.ctrl+u# b% X/ [8 n; X3 n( p( g
C.ctrl+e4 J5 K; M6 P1 Q8 i
D.ctrl+k# R6 L7 C$ T) N/ M5 P4 h# S
+ |( t+ b6 f1 K; {
5.在命令行下,强制删除file1、file3、file5的命令是?( A )
6 L( g6 j' X# [- d% p3 C/ G, v0 {A.rm –f file{1,3,5}. P h: @+ C* |+ K/ {" o
B.rm –f file(1,3,5)
1 o6 a+ i6 V6 R) C2 l! wC.rm –f file1 file3 file5
7 {' j! r& U- Y' ED.rm –rf file1 file3 fil5- u( u% @0 c( p/ a! z) X% J2 ~! D
7 ?" U( V4 i2 B6.在bash shell中,哪个是表示引用命令执行的结果?( D ) b# z {3 ~9 V
A. echo “hostname”) v: Y) S) P$ k
B. $(hostname)7 ?! p8 b( ^- G! p1 B" l0 ^& ^
C. `hostname`' x5 j* }& [1 d6 H) j& v
D. B和C都是- l9 J; E0 ^6 b; O5 D( f0 f
% O, E6 G- T9 t/ e2 f+ [4 s0 x8 e: W7.在bash shell中,以下哪个文件保存了用户的历史命令?( B )
2 h* R6 g1 j1 ?) d! j, n& XA.~/history! u( w$ R! |" t c
B.~/.bash_history
1 _6 [2 x9 p4 c, n" F1 \C.~/bash_history
4 @% o$ J$ h# T1 v q4 GD.~/.bash_hrc + `, x0 N: h" f, t% {
% B9 y4 I2 |0 k6 E* |3 c
8.在bash shell中,执行以下哪个命令可显示当前的日期?( B )
6 j$ B* l( k5 g( W2 RA.echo “date”
h! X( w" e/ y" E: n4 }& K# DB.echo `data`
) {3 k) I# n' @1 V( t- B9 c6 \3 G: v4 ?C.echo ‘date’
5 p6 T, ^# f# | l) yD.echo $data: ?2 Q& K6 L6 \$ [0 Z' V1 h
8 H8 K9 l# ]# l+ ?) S9.在命令行中,定义别名的命令是?( A )& W/ _2 U/ K5 w$ [
A.alias dir=’ls -laF’
! c0 D( @' U$ A# a: X" t5 l1 rB.alias dir=ls -laF
0 p" m' O% t4 R+ H& \3 }) Z" GC.Alias dir=’ls -laF’* O1 v3 s. I- W9 t1 Q. G2 Q; C
D.Alias dir=ls –laF* ~+ e0 i% H! @6 l, s
K3 ]3 @" H& z8 R4 a5 w7 @1 k" @9 n T
0.在命令行中,执行历史记录里最后一次以sys开头的命令是?( B )
7 R! ^. l* j+ F8 P* s! z+ YA.!1355 s& ^! ?9 z2 }( N/ H
B.!sys
o3 n& X& ^" A- E: r1 V' JC.sys+tab
/ r2 L" B: {) x, H) F" N; DD.$sys
$ L$ v( i2 J) X. W/ E5 @; @, v# s
6 q/ N" C9 [' a2 y誉天红帽认证课程咨询热线18696182106 微信同号
0 f3 p& V$ v9 K6 r# E |
|