Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
log bash session
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tucolino
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2003
Posts: 90

PostPosted: Sat May 15, 2004 11:13 pm    Post subject: log bash session Reply with quote

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
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Sat May 15, 2004 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
tucolino
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2003
Posts: 90

PostPosted: Sun May 16, 2004 12:11 am    Post subject: Reply with quote

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
View user's profile Send private message
shiftless
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2003
Posts: 128

PostPosted: Sun May 16, 2004 12:37 am    Post subject: Reply with quote

you may want to check out the "script" command.
Back to top
View user's profile Send private message
tucolino
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2003
Posts: 90

PostPosted: Sun May 16, 2004 12:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Anime_Fan
Guru
Guru


Joined: 01 Jul 2003
Posts: 366
Location: Linköping, Sweden

PostPosted: Sun May 16, 2004 4:09 am    Post subject: Reply with quote

history is kind of nice too, as script needs to be started before you do something.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Sun May 16, 2004 4:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum