|
发现有很多都是TeXLive文档,如果排除这些文档,简便的方法是排除/usr/share 下的文件
askubuntu.com/questions/1153513/
grep -v "grep" takes input line by line, and outputs only the lines in which grep does not appear.
要排除/usr/share/ 开头的行,您可以使用带有 -v(反向匹配)选项的 grep 命令。继续1#例子:- find / -type f -name "*.tex" 2>/dev/null | grep -v "^/usr/share" >"tex hunting.txt"
复制代码
再运行wc -l tex* 只剩下1418行了
用sed进一步排除/usr/local/share 开头的行
- sed -i '/^\/usr\/local\/share/d' 'tex hunting.txt'
复制代码
再运行wc -l tex* 只剩下1299行了
例如/nfs-mounts/ucalegon.it.ox.ac.uk/web/users/ucalegon.it.ox.ac.uk/4/a/quee4127/public_html/automorphic/notes/notes.tex 映射到网络路径notes.tex
/nfs-mounts/ucalegon.it.ox.ac.uk/web/users/ucalegon.it.ox.ac.uk/e/3/econ0506/public_html/Documents/Vitae/CV_Sedlacek.tex 映射到网络路径CV_Sedlacek.tex |
|