[geeks] need a utility to log an shell session's commands

Mike Parson mparson at bl.org
Mon May 3 14:11:07 CDT 2004


On Mon, May 03, 2004 at 03:06:14PM -0400, Nadine Miller wrote:

> I'm sure one of you guys can come up with something off the top of
> your heads, but for the life of me I can't recall what we used to do
> this at $job-3.
>
> It's basically a process that you start at a shell prompt that records
> all the stuff you do into a log file.  You can then use as the basis
> for writing up documentation, or, possibly as a basis for automating
> it.
>
> I want to say the name of it was 'script' but that's so generic that
> trying to find the right thing via google or freshmeat is pretty
> useless.

It is script(1)

$ type -a script
script is /usr/bin/script

> I know bash can do something a little like this, but I need a tool
> that will catch the entire session, even across 'su-ing' to various
> users (I have to install a complex piece of software tomorrow, and I
> want to have a record of it).

I've used screen with screenlog (C-a H) turned on for that sort of thing
too (even catches output).  The script command is more for catching
commands to save off to use for a script, hense the name.

-- 
Michael Parson
mparson at bl.org



More information about the geeks mailing list