Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1325  / 3 Years ago, sat, september 11, 2021, 12:35:58

Whenever we need to install any packages in Ubuntu we install it using the command:



sudo apt-get install <package-name>


Using redirection as below will save all the logs in a file:



sudo apt-get install <package-name> > Log.txt 


But the above command doesn't show any output in the terminal. Is there any way we can save all the logs in a file and can also see it on terminal?


More From » apt

 Answers
1

Yes you have to use tee to accomplish that.



sudo apt-get install <package-name> | tee Log.txt

[#10766] Sunday, September 12, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ttarum

Total Points: 417
Total Questions: 101
Total Answers: 115

Location: Maldives
Member since Wed, Nov 4, 2020
4 Years ago
;