User Tools

Site Tools


shell2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
shell2 [2022/02/02 09:53]
dblume [expect tips]
shell2 [2022/10/17 12:31] (current)
dblume [Protips for find]
Line 560: Line 560:
   find lib -type f -name \*.so\* -exec sh -c 'objdump -p "$1" | grep "NEEDED.*libz"' - {} \; -print   find lib -type f -name \*.so\* -exec sh -c 'objdump -p "$1" | grep "NEEDED.*libz"' - {} \; -print
      
-Note that you can pass -print (or -and -print) after a -exec argument. Also, the " - " is just a placeholder for $0 (usually the command name, in this case "sh"), we want $1 to be {}. It outputs results like:+Note that you can pass -print (or -and -print) after a -exec argument. You can also use -printf, ex., ''-printf %%"%%\t%f\n%%"%%''. Also, the " - " is just a placeholder for $0 (usually the command name, in this case "sh"), we want $1 to be {}. It outputs results like:
  
     NEEDED               libz.so.1     NEEDED               libz.so.1
shell2.1643824438.txt.gz · Last modified: 2022/02/02 09:53 by dblume