Find 逻辑
!,-not 非
-a,-and 与
-o,-or,逗号 或
排除某文件
Find . \! -name “zhang” -type f
查找或
Find . -regex ‘.*\.txt\|.*\.doc’
find . -type f -name “*.java[0-9]*” //java后面有一位数字后面任意

xuenhua’s 站点
Find 逻辑
!,-not 非
-a,-and 与
-o,-or,逗号 或
排除某文件
Find . \! -name “zhang” -type f
查找或
Find . -regex ‘.*\.txt\|.*\.doc’
find . -type f -name “*.java[0-9]*” //java后面有一位数字后面任意
增加的代码行数量
git log –stat|perl -ne ‘END { print $c } $c += $1 if /(\d+) insertions/’
精确的代码行修改数量:
git log –author=”$(git config –get user.name)” –pretty=tformat: –numstat | gawk ‘{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf “added lines: %s removed lines : %s total lines: %s\n”,add,subs,loc }’
上面不行就这个:
git log –pretty=tformat: –numstat | gawk ‘{ add += $1 ; subs += $2 ; loc += $1 + $2 } END { printf “added lines: %s removed lines : %s total lines: %s\n”,add,subs,loc }’
<< EOF 是执行一命令,命令从<<EOF行开始到EOF出现的地方结束。例如:
继续阅读“命令行中打开文件后执行命令”