# strace **strace** spies on what [System calls](./System_Calls.md) a program makes. ``strace [flags] command`` Some useful strace flags: `-e open` search for the `open` system call `-f` follow subprocesses and strace them too `-p 673` what is this process doing? `-c` summarizes output with CPU time for each syscall `-s 50` shows you the first 50 lines of strings `-o file.txt` stores output for later `-y` converts file descriptor numbers to filenames; newer flag You can see a list of system calls [here](./System_Calls.md). ***** If you want to see what files ``dig`` is opening (reading) just do ``strace -f -e open dig``. Jvns has [an awesome zine](https://wizardzines.com/zines/strace/) on the what and how for strace.