Add the o switch to the strace call in exercise E5 in order to direct strace output
Question:
Add the o switch to the strace call in exercise E5 in order to direct strace output to a file and include a summary of the output together with a brief description what you observe in your report. Details of operating system calls will be discussed in Lab 2. You may want to check the manual page of strace for your documentation.
E5: Use strace to look at mycat in operation. Type $ strace ./mycat cmd2.sh to see it print to the console the contents of filecopy.c . You may well see quite a lot of things going on, but we can limit this to only a set of system calls we are interested in. Issue the command: $ strace -C -e trace=open,close,read,write ./mycat cmd2.sh This will limit the output to only the file system calls and also print a summary.
Note: the number of calls to both read and write may not be what you expect!