[plug] Trace files

Matt Kemner zombie at wasp.net.au
Mon Dec 11 09:29:45 WST 2000


On Sun, 10 Dec 2000, Robert Andrews wrote:

> ? When I issue a command like IFUP PPP0
> is there a way that i can see exactly what files and scripts are being used by the command 
> other than going through the scripts themselves.

Considering it is a shell script, by far the easiest way to work out what
it's doing is to read the script itself.

You can make it slightly easier by adding a line "set -x" at the top of
the file, which causes bash to echo each line before it parses it.

> I will no doubt want to trace other commands in the future to see what
> files and scripts are being executed so I can continue my Linux self
> teaching. 

If you are trying to trace a compiled program, and you don't have easy
source access, the easiest way to trace what it's doing is by using the
"strace" function.

ie: "strace program >& program.out"
and then view the "program.out" with your favourite text viewer.

 - Matt




More information about the plug mailing list