find . -name "*.[chCH]" -print | etags -
来源:互联网 发布:windows不能安装在usb 编辑:程序博客网 时间:2024/05/21 10:53
find的-print
-print True; print the full file name on the standard output, followed
by a newline. If you are piping the output of find intoanother program and there is the faintest possibility that the
files which you are searching for might contain a newline, then
you should seriously consider using the -print0 option instead
of -print. See the UNUSUAL FILENAMES section for information
about how unusual characters in filenames are handled.
-print0
True; print the full file name on the standard output, followed
by a null character (instead of the newline character that
-print uses). This allows file names that contain newlines or
other types of white space to be correctly interpreted by pro‐
grams that process the find output. This option corresponds to
the -0 option of xargs.
etags 后面的 - 表示etags把前面find的结果从stand input中读入,因为etags不是管道命令,所以只能用这种方法。当然还可以使用xargs达到同样的效果。
find . -name "*.[chCH]" | xargs etags 也可以达到同样的效果,但是因为xargs默认按空白符隔断,所以find出来的文件名中不能有空白符。
find . -name "*.[chCH]" -print0 | xargs -0 etags 可以处理文件名中有空白符的情况。
xargs的原理:
假如find的结果有两个分别是./test.c ./main.c,那么xargs会以空白符位间隔,识别出这两个文件名放到etags后面作为参数,等同于etags ./test.c ./main.c
- 的原理见鸟哥6.7节。
- find . -name "*.[chCH]" -print | etags -
- find / -name "libmysqlclient_r.so.*" -print
- find . -name *.c -print 为何出错
- find . -name \* -type f -print | xargs grep “关键字”
- etags
- find program by name.
- find . -name -exec rm {} \;
- find ./ -name abc
- find . -name '*abc*'
- find -name patten
- find trace file name
- find / -name nginx
- android debug, print class name, line number
- pwd--print name of current/working directory
- etags 用法
- emacs + etags
- emacs etags
- 配置ETags
- sudo apt-get 和dpkg命令大全
- eclipse安装SVN
- Permutations
- linux设备驱动归纳总结(四):4.单处理器下的竞态和并发
- 会议是浪费工作时间的最佳去处
- find . -name "*.[chCH]" -print | etags -
- CalendarExtender日历控件
- Permutations II
- 一个IP地址搜索服务
- 《众神召唤HD》 国内版发布了 - 基于cocos2dx
- C输入输出
- linux设备驱动归纳总结(四):5.多处理器下的竞态和并发
- 死锁()
- Linux大量的TIME_WAIT处理