tee# Write to a file and stdout. $ cmd | tee out.log $ cmd | tee -a out.log $ cmd | sudo tee /etc/file.conf