Sometimes I wonder how Linux programs achieve certain results knowing that they internally use system calls (system() or exec() in C programs). Given a working binary I wonder if it is possible to know easily which commands where executed. In a concrete example I use the genealogy tool gramps to build a family tree. I assume that it generates certain graphs using graphviz (using command line tools rather than libraries). Now I want to reproduce the same manually on the command line. This task would be simplified a lot if I knew the commands used by gramps. I could download and look at the sources to find out, but I wonder if I can obtain this information more easily using debugging tools such as strace, something like strace gramps 2>/dev/stdout | grep system. Note that I would not like to search the binary using a hex editor unless this can be automated. Looking at the sources directly should be easier in this case.
Retrieve system commands without reading sources
command line;command;strace
strace -o dumpfile.strace -f -e trace=process $your $app $with $parametersYou find the result in the file dumpfile.strace.