ANYWEI : CODING

积累点滴,成就梦想

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年11月7日

摘要: find -name "t*" -perm 744 -print查找当前目录下文件名以t开头的,且文件属性主具有读、写、执行权限的文件。。。。find还有-exec选项,对匹配文件执行该参数过给出的shell命令。例如:find /etc/ -type f -name "rc*" -exec ls -l {} \;注意{}和\之间有空格。。。具体学习见man find... 阅读全文
posted @ 2011-11-07 21:37 anywei 阅读(261) 评论(0) 推荐(0) 编辑

摘要: 造成这个现象的原因是/etc/passwd文件的ext2文件属性被修改(但即便是在ext3系统中,这个属性也有效果。目前还没在ext4文件系统中测试)。使用lsattr可以查看该文件的属性:passwd文件被设置了"i"属性,该属性指定当前文件不可被修改,在手册中对此属性的描述为(man chattr):Afilewiththe‘i’attributecannotbemodified:itcannotbedeletedorrenamed,nolinkcanbecreatedtothisfile andnodatacanbewrittentothefile.Onlythesu 阅读全文
posted @ 2011-11-07 21:24 anywei 阅读(1015) 评论(0) 推荐(0) 编辑