View previous topic :: View next topic |
Author |
Message |
tucolino Tux's lil' helper
Joined: 12 Jun 2003 Posts: 90
|
Posted: Sat May 15, 2004 11:13 pm Post subject: log bash session |
|
|
is there a way to log a bash session? this is helpful to rememeebr how i got some things working, bug reports, etc. i am aware of history and .bash_history but these don't record the output of programs. redirecting output using ">" and ">>" doesn't always work and it doesn' t allow you to keep on typing. i could very well cut and paste, but this is not viable if working on virtual consoles without a mouse. any ideas?
thanks,
tuco _________________ Alvaro Ramirez
http://www.xenodium.com/blog
eye candy corner |
|
Back to top |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Sat May 15, 2004 11:49 pm Post subject: |
|
|
This might work for you. Code: | bash -i 2>&1 | tee logfile | Unfortunately that doesn't log the commands, just the output. I think there is some way to have bash echo commands to stdout too but I don't know how.
Also ncurses apps won't work in that shell. |
|
Back to top |
|
|
tucolino Tux's lil' helper
Joined: 12 Jun 2003 Posts: 90
|
Posted: Sun May 16, 2004 12:11 am Post subject: |
|
|
PowerFactor wrote: | This might work for you. Code: | bash -i 2>&1 | tee logfile | Unfortunately that doesn't log the commands, just the output. I think there is some way to have bash echo commands to stdout too but I don't know how.
Also ncurses apps won't work in that shell. |
cool. thats a start. thanks.
tuco _________________ Alvaro Ramirez
http://www.xenodium.com/blog
eye candy corner |
|
Back to top |
|
|
shiftless Tux's lil' helper
Joined: 08 Oct 2003 Posts: 128
|
Posted: Sun May 16, 2004 12:37 am Post subject: |
|
|
you may want to check out the "script" command. |
|
Back to top |
|
|
tucolino Tux's lil' helper
Joined: 12 Jun 2003 Posts: 90
|
Posted: Sun May 16, 2004 12:47 am Post subject: |
|
|
shiftless wrote: | you may want to check out the "script" command. |
perfect!! thanks a lot. not many people know that!
tuco _________________ Alvaro Ramirez
http://www.xenodium.com/blog
eye candy corner |
|
Back to top |
|
|
Anime_Fan Guru
Joined: 01 Jul 2003 Posts: 366 Location: Linköping, Sweden
|
Posted: Sun May 16, 2004 4:09 am Post subject: |
|
|
history is kind of nice too, as script needs to be started before you do something. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Sun May 16, 2004 4:11 am Post subject: |
|
|
You might want to check this thread about logging bash commands to syslog.
https://forums.gentoo.org/viewtopic.php?t=141672&highlight=
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|