From: moonhkt on
On 4月22日, 下午7時50分, Ed Morton <mortons...(a)gmail.com> wrote:
> On 4/22/2010 12:30 AM, moonhkt wrote:
>
> > Hi All
>
> > System  :AIX 5.3
>
> > I prepare procedure for Database activity to other party. I want log
> > each command to a file.
> > how to log commad to a file ?
>
> > e.g.
> > ls -lt *.txt
> > ps -ef|grep pro
> > ps -ef|grep pro|wc -l
> > rm *.txt
>
> man script

Just test script(script — make typescript of terminal session) on
cygwin. It works. Will try on AIX.
For other suggestion, will try on AIX
exec 2> "$HOME/log.$$"
set -v ## or: set -x

and history

Thank a lot.

FYI
Just want keep the user input command at shell prompt. For running
script, inside the script already keep the shell name in log file.
From: Robert Bonomi on
In article <9cf774a9-a568-4554-87ca-d8693a2e965e(a)k33g2000prk.googlegroups.com>,
moonhkt <moonhkt(a)gmail.com> wrote:
>Hi All
>
>System :AIX 5.3
>
>I prepare procedure for Database activity to other party. I want log
>each command to a file.
>how to log commad to a file ?


'man script' should provide what you want.