Monday, May 13, 2024
90
rated 0 times [  90] [ 0]  / answers: 1 / hits: 165269  / 3 Years ago, fri, december 3, 2021, 8:18:29

How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal.


More From » command-line

 Answers
4

When you are ready to start recording a log file, type:



script screen.log


Now, until you stop the script, all input and output in the Terminal will be stored in screen.log. When you are done, just type:



exit


Your screen.log file will stored in the local directory. If you want to redirect it, use an absolute pathname such as ~/screen.log. This will do exactly what you are looking for.



Source: Ubuntu Guide - How To Log Terminal Commands


[#36958] Sunday, December 5, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ongdiligenc

Total Points: 452
Total Questions: 111
Total Answers: 107

Location: Ukraine
Member since Sun, Dec 13, 2020
3 Years ago
;