shell攻略-命令之乐

find指令
[hadoop@localhost 桌面]$ find .  -name  "*.sh" -print
./sh10.sh
./scripts/sh01.sh
./scripts/sh02.sh
./sh03.sh
[hadoop@localhost 桌面]$ find .  -iname  "*.sh" -print
./sh10.sh
./scripts/sh01.sh
./scripts/sh02.sh
./sh12.Sh
./sh03.sh




[hadoop@localhost 桌面]$ find . \( -name "*.txt" -o -name "*.sh" \) -print
./sh10.sh
./regular_express.txt
./scripts/sh01.sh
./scripts/sh02.sh
./out.txt
./sh03.sh


正则表达式
[hadoop@localhost 桌面]$ find . ! -name "*.sh" -print
.
./regular_express.txt
./文档软件
./文档软件/hadoop-1.1.2-1.i386.rpm
./文档软件/鸟哥的Linux私房菜 基础学习篇(第三版).pdf
./文档软件/jdk-6u13-linux-i586.zip
./文档软件/supmax800_nt.zip
./scripts
./scripts/.sh03.sh.swp
./add
./google-chrome.desktop
./netbeans-7.3.1.desktop
./out.txt
./sh12.Sh
./.ttput.swp
./jdk-6u13-linux-i586.bin
./add~
./passwd




find . -maxdepth 3 -type f -print
find . -mindepth 3 -type f -print


find . -type f/l/d/c/b/s/p





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值