1、find 命令
find . -path "./android" -a -prune -o -name "system_1.img" -print
find ~ -type d -print
find / -name “*.log” -ok rm {} \;
find . -name core -exec rm {} \;
find ~ -type f | xargs ls -l
2、grep/egrep 命令
grep -nR "UFS Boot LUN" --exclude-dir=android --exclude-dir=docker --exclude-dir=burn --exclude-dir=compiler
grep -nRw "UpdateService" 精准过滤 -i 不区分大小写 -v 排除取反
grep -E '123|abc' filename
egrep '123|abc' filename
3、grep & find 的组合使用
find /PATH -name "*.h" -exec grep -in "helloworld" {} \;
find /PATH /( -name "*.h" -or -name "*.c" /) -exec grep -in "helloworld" {} \;
find . -type f |xargs grep -i “Mary”
ls *~ |xargs rm -rf
4、curl 命令
curl -u root:root ftp://172.16.100.30/tmp/NON-HLOS.bin -T /data/NON-HLOS.bin
curl -O -u root:root ftp://172.16.100.30/NON-HLOS.bin
5、vim中 去空格和Tab
:%s/\t/ /g
:set list
行末:$
行首:^
空格:\s
行末空格:\s\+$
行首空格:^\+\s
:%s/\s\+$//