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 revisionPrevious revision
Next revisionBoth sides next revision
shell2 [2022/02/02 09:53] – [expect tips] dblumeshell2 [2022/10/17 12:31] – [Protips for find] dblume
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.txt · Last modified: 2023/05/17 09:47 by dblume