How to save History in linux


How to save History in Linux :
————————————–
We can save history by using command script in command prompt.

Output Details :
——————-
chaitanya-GA-78LMT-S2 ~ # ls
history.log
Check with vim history.log  –> You can see what you have done from total day history will be save.

history

Start the Script :
——————–
chaitanya-GA-78LMT-S2 ~ # script history.log
Script started, file is history.log

Exit the Script :
——————-
Press Ctrl+d
chaitanya-GA-78LMT-S2 ~ # exit
Script done, file is history.log

Advertisements