Re: how to know list of files accessed

From: Valdis . Kletnieks
Date: Mon Feb 13 2012 - 23:44:48 EST


On Mon, 13 Feb 2012 13:32:56 +0100, Michael Opdenacker said:

> An easy way is to run your command with 'strace' to trap all the calls
> to 'open':
>
> strace make 2>&1 | grep open

You really want 'strace -f make' - the -f flag makes it follow forks, which you
want to do because it's gcc that's doing most of the actual file I/O, not make.

Oh. and you want to redirect that grep into a temporary file and be
prepared to post-process it with perl or something, there's going to be
*zillions* of open() syscalls.

Attachment: pgp00000.pgp
Description: PGP signature