I know that in Linux, to redirect output from the screen to a file, I can either use the > or tee. However, I’m not sure why part of the output is still output to the screen and not written to the file.
Is there a way to redirect all output to file?
That part is written to stderr, use
2>to redirect it. For example:or if you want in same file:
Note: this works in (ba)sh, check your shell for proper syntax