linux 命令 2.0

 

 

 

  •  查看库属于哪个编译器:
    • # readelf -p .comment libascendcl.so 
      String dump of section '.comment':
        [     0]  GCC: (HC&C V1R3C00SPC200B042_20221123) 7.3.0
      
      # aarch64-mix210-linux-gcc --version
      aarch64-mix210-linux-gcc (HC&C V1R3C00SPC200B042_20221123) 7.3.0
      Copyright (C) 2017 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

  • 查看公网ip:  curl ifconfig.me
  • 驱动里面查找打印字符串: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   // 静态库: -gA
  • 查找包含 1.8.3 但不包含 ?v=1.8.3 的: grep -inr '1.8.3' . | grep -v '?v=1.8.3'
posted @ 2025-06-30 14:54  封兴旺  阅读(29)  评论(0)    收藏  举报

联系方式: 18274305123(微信同号)