I read that post but I do not believe I can use accounting -see in the version of Solaris I have can I.
I tried the two ls commands but they don't give me what I need.
I need a list of all scripts executed on the Solaris box over the previous month or to turn something on that can monitor for the next month to see what is being run currently so I can work out what scripts to move to the Linux box.
You're asking how to know which scripts run during the next month. So are users still using this system? If so, can't you ask them what commands they are running? If cron is automatically running stuff, why not pull up the crontabs and look at them?
Files are normally in:
/usr/spool/cron/crontabs
one file per username that has jobs scheduled. Although you shouldn't edit these files directly, they are perfectly readable with 'cat' for example.
Sorry if I'm on the wrong track here but I'm not clearly understanding your difficulty.
Solaris 9 is old (released in 2002, supported until 2014), but is not ancient. The "ls" command hasn't substantially changed in the last 3 or 4 four decades so identifying the scripts that have been accessed is a first and easy step. Same for accounting which was supported by Solaris 9.
Anyway, a simple method to identify if existing scripts are executed is to wrap them with a logger script.
For example, assuming you have several shell scripts in the /opt/local/bin directory
You create a directory /opt/local/bin_org and move the scripts you want to monitor in it, then you create a wrapper script and have the system using it when the original scripts are expected:
cd /opt/local/bin/
cat > .wrapper <<%
#!/bin/ksh
echo \$0 "\$@" called at \$(PATH=$(getconf PATH) date +%Y%m%dT%H%M%S) >> /var/tmp/scriptLogs
exec \$(PATH=$(getconf PATH) dirname \$0)/../bin_org/\$(PATH=$(getconf PATH) basename \$0) "\$@"
%
chmod +x .wrapper
for script in ../bin_org/*; do
ln .wrapper $(basename $script)
done