I'm trying to write the output of strace ls
to a file. I know that I need to use >
in order to forward output of a command to a file, but it doesn't work. It creates a file but the command prints the output of strace ls
to stdout but writes the file name into the file.
$ strace ls > ls_sys.txt
...
strace output
...
$ cat ls_sys.txt
ls_sys.txt
-o
option rather than shell redirectionstrace -o ls_sys.txt ls
?