政府机关

aix基础概念的问题,请教一下

首先是两道find命令对错题:

第一题:True or false? find's most important characteristic is its ability to
travel up through the file tree hierarchy.

第二题: True or false? When quoted metacharacters are used with find, the
shell will first expand the wildcard then pass control to find.


第三题:

有个文件,就是passwd.back:

root:!:0:0::/:/usr/bin/ksh
root:1:3:4:5:m:/p
root:2:9:3:8:n:q
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home0/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
lp:*:11:11::/var/spool/lp:/bin/false
invscout:*:6:12::/var/adm/invscout:/usr/bin/ksh
snapp:*:200:13:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd
ipsec:*:201:1::/etc/ipsec:/usr/bin/ksh
nuucp:*:7:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
esaadmin:*:811:0::/home0/esaadmin:/usr/bin/ksh
jiang:!:202:0::/home0/jiang:/bin/bash
sshd:*:203:201::/var/empty:/usr/bin/ksh
ldap:*:204:1::/home0/ldap:/usr/bin/ksh

用grep命令列出uid在200-299之间的所有用户。
参与28

28同行回答

dereek.shidereek.shi系统管理员insit
第二题: True or false? When quoted metacharacters are used with find, the shell will first expand the wildcard then pass control to find.Answer:   False:   command(find) expression:       find path expression&nb...显示全部
第二题: True or false? When quoted metacharacters are used with find, the shell will first expand the wildcard then pass control to find.
Answer:
   False:
   command(find) expression:
       find path expression
   attenttion: expression(regular expression), not pattern matching
   Some commands,such as (e)grep, sed, awk, find and locate, use own regular expression which similar with pattern matching.
   Shell expanded before command execution.therefore, quote metacharacters with find is used to prevent shell expanded the string before find command can execute.收起
金融其它 · 2010-04-27
浏览1443
dereek.shidereek.shi系统管理员insit
第三题:有个文件,就是passwd.back:root:!:0:0::/:/usr/bin/kshroot:1:3:4:5:m:/proot:2:9:3:8:n:qdaemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys:adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp:guest:!:100:100::/home0/guest:nobody:!:4294967294:4294967294:...显示全部
第三题:
有个文件,就是passwd.back:
root:!:0:0::/:/usr/bin/ksh
root:1:3:4:5:m:/p
root:2:9:3:8:n:q
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home0/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
lp:*:11:11::/var/spool/lp:/bin/false
invscout:*:6:12::/var/adm/invscout:/usr/bin/ksh
snapp:*:200:13:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd
ipsec:*:201:1::/etc/ipsec:/usr/bin/ksh
nuucp:*:7:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
esaadmin:*:811:0::/home0/esaadmin:/usr/bin/ksh
jiang:!:202:0::/home0/jiang:/bin/bash
sshd:*:203:201::/var/empty:/usr/bin/ksh
ldap:*:204:1::/home0/ldap:/usr/bin/ksh
用grep命令列出uid在200-299之间的所有用户。

Answer:
$ cat passwd.back |grep "2[0-9][0-9]:"
(没有测试,自己试一下。不能写成$ cat passwd.back |grep "2[0-99]:"  //会把uid为2位(20~29)的也会抽取出来。)
To omit  ":" is done in "2[0-9][0-9]:" , the ":" is used for matching accurately.
":" is a separation in the file named passwd.back.
"2[0-9][0-9]:" also can be done.收起
金融其它 · 2010-04-27
浏览1459
dereek.shidereek.shi系统管理员insit
第三题:有个文件,就是passwd.back:root:!:0:0::/:/usr/bin/kshroot:1:3:4:5:m:/proot:2:9:3:8:n:qdaemon:!:1:1::/etc:bin:!:2:2::/bin:sys:!:3:3::/usr/sys:adm:!:4:4::/var/adm:uucp:!:5:5::/usr/lib/uucp:guest:!:100:100::/home0/guest:nobody:!:4294967294:4294967294:...显示全部
第三题:
有个文件,就是passwd.back:
root:!:0:0::/:/usr/bin/ksh
root:1:3:4:5:m:/p
root:2:9:3:8:n:q
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:
guest:!:100:100::/home0/guest:
nobody:!:4294967294:4294967294::/:
lpd:!:9:4294967294::/:
lp:*:11:11::/var/spool/lp:/bin/false
invscout:*:6:12::/var/adm/invscout:/usr/bin/ksh
snapp:*:200:13:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd
ipsec:*:201:1::/etc/ipsec:/usr/bin/ksh
nuucp:*:7:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico
esaadmin:*:811:0::/home0/esaadmin:/usr/bin/ksh
jiang:!:202:0::/home0/jiang:/bin/bash
sshd:*:203:201::/var/empty:/usr/bin/ksh
ldap:*:204:1::/home0/ldap:/usr/bin/ksh
用grep命令列出uid在200-299之间的所有用户。

Answer:
$ cat passwd.back |grep "2[0-9][0-9]:"
(没有测试,自己试一下。不能写成$ cat passwd.back |grep "2[0-99]:"  //会把uid为2位(20~29)的也会抽取出来。)收起
金融其它 · 2010-04-27
浏览1475
dereek.shidereek.shi系统管理员insit
第一题:True or false? find's most important characteristic is its ability to travel up through the file tree hierarchy.Answer:False:find's most important characteristic is its ability to travel down subdirectories.(attention: travel down, not travel up...显示全部
第一题:True or false? find's most important characteristic is its ability to travel up through the file tree hierarchy.
Answer:
False:find's most important characteristic is its ability to travel down subdirectories.(attention: travel down, not travel up)收起
金融其它 · 2010-04-27
浏览1406
chinadjzhchinadjzhsap basis网络(北京)有限公司
呵呵,光剩下回复了,没有人真正的回答问题了,呵,这个楼主没想到吧显示全部
呵呵,光剩下回复了,没有人真正的回答问题了,
呵,这个楼主没想到吧收起
IT分销/经销 · 2009-07-16
浏览1413
aixclubaixclub网站运营经理TWT
给编辑成不要回复就能看了,这人真不知道咋想的!显示全部
给编辑成不要回复就能看了,这人真不知道咋想的!收起
互联网服务 · 2009-07-16
浏览1407
chinadjzhchinadjzhsap basis网络(北京)有限公司
1234567890-显示全部
1234567890-收起
IT分销/经销 · 2009-07-16
浏览1393
htwcmhtwcmitinfolink
解决问题还要回复??????显示全部
解决问题还要回复??????收起
IT分销/经销 · 2009-07-09
浏览1416
myciciymyciciyIT顾问某金融科技公司
搞啥呢  还要回复啊显示全部
搞啥呢  还要回复啊收起
银行 · 2009-06-29
浏览1171
conceitconceit职员北京朝批商贸有限公司
看看隐藏了什么东西 自己学习显示全部
看看隐藏了什么东西 自己学习收起
2009-06-29
浏览1157

提问者

白菜
软件开发工程师dcits
擅长领域: 服务器主机数据库

问题状态

  • 发布时间:2009-06-22
  • 关注会员:0 人
  • 问题浏览:12651
  • 最近回答:2010-04-27
  • X社区推广