How find out dependences for a software?

Gerard Beekmans gerard at
Sat Mar 16 08:46:08 PST 2002

On Sat, Mar 16, 2002 at 11:42:53AM -0500, Gerard Beekmans wrote:
> strace -q -e trace=execve -f -F -o procinfo.logfile procinfo-install-script

I forgot to add, the output of strace can contain a lot of duplicate lines.
Say gcc may be run 10 times if there are 10 source files to compile, then
as and ld are run 10 times too and so on. After strace run something like

cat proinfo.logfile | grep -v "Child exited" | grep -v "ENOENT" | \
        grep -v "execve resumed" | cut -f 2 -d "\"" | \
        sort | uniq > procinfo.logfile.cleanedup

This'll remove some cruft like "execve resumed" message and others that you
don't care about. Then cut -f -2 -d "\"" will cut out the program name that
was run (remember I only captured for execve, you may need to change this
if you wnat to capture more), sort will sort the list and then uniq will
remove duplicate lines so you're left with exactly one of each command that
was run.

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list