Updating Rust to next version

Assuming you are using bash type shell?

Directing the output to file is a good idea if you wan to save the text. But keep in mind that the ">>" will append to the up.txt file if it already exists.

Also the output of rustup is to both stdout and stderr.
If you do the command as you posted it will only save the stdout stuff and the stderr stuff will still go to your terminal.

You may need to use a more complex redirection.

rustup  update > up.txt 2>&1

to save stderr and stdout to same file or

rustup update > up.txt 2> up.err 

to save stdout and stderr to two separate files.

1 Like