首页 > 系统服务 > 详细

linux学习中遇到的问题—请教

时间:2017-05-28 16:43:42      阅读:375      评论:0      收藏:0      [点我收藏+]

问题1:find命令用 “-a” 时为什么找不出以下*sample*文件?

[root@lys test]# find / -name "usr"
/usr
/usr/share/doc/oddjob-0.30/sample/usr
/usr/share/gdb/auto-load/usr
[root@lys test]# find / -name "usr" -a -name "sample"
[root@lys test]# find / -name "usr" -a -name "*sample*"
[root@lys test]#

 解答:该命令相当于既找一个文件该文件既叫usr同时又叫sample,矛盾!

问题2:以下命令为什么不能重定向?

[root@lys test]# ifconfig eth10
eth10: error fetching interface information: Device not found
[root@lys test]# ifconfig eth10 2> /dev/null
[root@lys test]# ifconfig eth10 | grep ‘interface‘ 2> /dev/null
eth10: error fetching interface information: Device not found
[root@lys test]#

 

linux学习中遇到的问题—请教

原文:http://www.cnblogs.com/linux-ll/p/6915926.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!