Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: bash history log, how to get it to record root commands< Next Oldest | Next Newest >
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Sep. 03 2008,01:18 QUOTE

Afaik the history buffer in bash is only appended to that "global" history file after the session is done.

There may be a config option somewhere to write at every command, or you could use another shell that does that by default (like busybox's ash iirc), but that won't really help you if you need to record the output as well.  There may be some logging options available though.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 03 2008,02:40 QUOTE

the 'script' application is made specifically to record everything that shows up on your screen.
script myscript.txt (Warning: Don't use the command "cat  myscript.txt" after starting the script :))

On a very old machine you will likely see a performance hit, mainly I think because it creates a subshell that is constantly recording everything happening in the original shell.  Ctrl+D stops the recording and closes the subshell.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Sep. 03 2008,02:47 QUOTE

ah, that application slipped my mind.  So yea, script should do what you want.
Back to top
Profile PM 
7 replies since Sep. 02 2008,16:37 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: bash history log

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code