Can we write the output of Cargo command into a File rather than see on terminal?

When I run any cargo command i.e. cargo clippy , then we see the output on terminal. Is it possible to see the cargo command output to an external file (output.txt). Just like log files… Thanks in advance.

if you are on linux you can just redirect the output:

cargo clippy &> SomeFile.txt

Thanks for your prompt reply. Could you tell me about the path of the said output file ?

Thanks . The output file will be on root of your current folder…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.