linux 命令 2.0
- 驱动里面查找打印字符串:strings ot_mipi_rx.ko | grep "fxw"
- 查找关键字并替换: find . -type f -exec sed -i 's/aaa/bbb/g' {} +
- find . -name '*.mk' -type f -exec sed -i 's/aaa/bbb/g' {} +
- find . \( -name 'Makefile' -o -name '*.mk' \) -type f -exec sed -i 's/aaa/bbb/g' {} +
- 在库里面查找函数并输出库名:find out/lib/ -name *.so -exec nm -DA {} + | grep AAA
- 查找包含 1.8.3 但不包含 ?v=1.8.3 的: grep -inr '1.8.3' . | grep -v '?v=1.8.3'
本文来自博客园,作者:封兴旺,转载请注明原文链接:https://www.cnblogs.com/fxw1/p/18957802