Skip to main content

Thread: terminal logger using script command


hi,

every time open terminal cml magic, i'd entire session automatically logged. (including set ps1 variable before $, added timestamp + date ps1 can know when did what.)

trying inside .bashrc file:

code:
#log in terminal   script -afq ~/log/shell.log.txt
but not work, strange output , standard .bashrc run not exit properly. have ctrl + c , kills .bashrc invocation because not ps1 colors/date formatted.

it's hard google strategy also, because every time type in .bashrc + logger + script in google newbie tutorials "running scripts , purpose of bashrc".

next step write bash script archive every terminal run in individual files time stamp. i'm sure breeze once figured out.

1 more thing, if run script inside terminal, output formatted strangely. weird line feed characters so:

code:
^c^[]0;
any advice on how can format output script command? , if have advice or resource on how can google script command examples or tutorials appreciate it, because when google script + format output, don't pertinent results.

i've tried script command interactively, , has work me in past (except when running editor vi though). have tried running manually when initiate session?

btw, running ubuntu desktop edition? because alternative modify gnome-terminal launcher, , add -e option:

  • right click on launcher.
  • select properties.
  • modify command line looks this:
    code:
    gnome-terminal -e "script ./log/shell.log.txt"

thought, hope helps.


Forum The Ubuntu Forum Community Ubuntu Community Discussions The Cafe terminal logger using script command


Ubuntu

Comments

Popular posts from this blog

Thread: Where to get the latest Ubuntu 10.10 .iso file

After Effect warning: A problem occurred when processing OpenGL commands

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support