Sponsored Content
Full Discussion: Find last executed timestamp
Top Forums UNIX for Dummies Questions & Answers Find last executed timestamp Post 302597116 by ysrini on Thursday 9th of February 2012 08:29:52 AM
Old 02-09-2012
Find last executed timestamp

Hi,
on our hp-ux box we have 100s of shell scripts in a bin folder.
Now i have to figure out which scripts are not being used at all.
The timestamp for these are the ones when they were promoted to this 'bin' folder.
Now, how can I find when was the last time each of these scripts were run?
I cannot update the scripts now (to write some log that i can capture to see when it was run) as these are production jobs.

Thanks,
-srinivas yelamanchili
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find the exit status for the last executed command

I am executing a find command in my script i.e find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \; how do i check that this command is executed properly.. i would lke t trap the errror and display my error message kinly help.. this is an urgent issue. (1 Reply)
Discussion started by: vijay.amirthraj
1 Replies

2. Shell Programming and Scripting

How to find pid of PS which executed by perl system function

hello All, I need to invoke by perl script some program/command and monitor it for 5 minutes . In case it still running for more then 5 min I need to send a signal which will stop it. I implemeted this as shown below by using eval & alarm and I'd like to know if there is a better way to... (1 Reply)
Discussion started by: Alalush
1 Replies

3. Shell Programming and Scripting

Find a value and the previous timestamp

Hi, I need to do a script that find a specific data in var_5 and also the previous timestamp. This is the file I have: var_1=data1 var_2=data2 var_3=data3 var_4=data4 var_5=data5 var_6=data6 var_7=data7 RESULT PRINTOUTS: 6404 var_1=data8 var_2=data9 var_3=data10 var_4=data11... (7 Replies)
Discussion started by: gcsilva
7 Replies

4. Shell Programming and Scripting

how to find status of last executed cmd in perl?

In shell we can find the status of last executed command by $? In perl what is the command to find the status of last executed command... Can any one please say??????????????? Thanks, Prabhu (1 Reply)
Discussion started by: prsampath
1 Replies

5. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

6. Shell Programming and Scripting

Find logs between two timestamp

Suppose there are log entries like 16 Jul 2012 11:46:45,628 SendToClientService ExecuteThread: '256' for queue: 'weblogic.kernel.Default (self-tuning)': Received an unknown fault. 16 Jul 2012 11:47:45,650 SendToClientService ExecuteThread: '256' for queue: 'weblogic.kernel.Default... (4 Replies)
Discussion started by: snehasish_jana
4 Replies

7. AIX

How to find the log for executed command in IBM AIX?

In Unix If we executed any command where will generate the particluar log related to command in Unix. (4 Replies)
Discussion started by: victory
4 Replies

8. Shell Programming and Scripting

How to append timestamp in the filenames using find?

Hi, How to change the filenames with timestamp in sub folders I have the following code to select the records. find . -type f -name '*pqr*' -ctime 1 -print The following is the example app_root_dir="/`echo $ScriptDir | cut -d'/' -f2`" $app_root_dir/../BadFiles directory uvw.bad... (3 Replies)
Discussion started by: bobbygsk
3 Replies

9. Shell Programming and Scripting

Find logon user based on executed script proc id

Hi, i have requirement to find logged in user based on process id. i have below scenario. 1. all my users will logon to unix box using ssh from windows system. 2. after successful logon they will sudo to common user. ex. sudo -su edadm lot of users are executing jobs from edadm user and... (2 Replies)
Discussion started by: tmalik79
2 Replies

10. UNIX for Beginners Questions & Answers

Find Original user who executed the command

Hi Team, Please help me with the below question. SunOS 5.10 Shell: -bash I am trying to find the original user who executed a command on my development server. In my dev server users login using their personal id and sudo to a common id using 'sudo -u commonid -i'. Once logged in as... (6 Replies)
Discussion started by: sam99
6 Replies
itruns(8)						      System Manager's Manual							 itruns(8)

NAME
itruns - set up files for use by the it command SYNOPSIS
/sbin/itruns file [file...] in run-state [, file [file...] in run-state] [,...] DESCRIPTION
The itruns program sets up scripts to be run by it(8). (These programs are typically used within system configuration and installation scripts.) The itruns command searches for /sbin/it.d/bin/file. If itruns finds the file, it creates one or more symbolic links from /sbin/it.d/run-state.d/file to /sbin/it.d/bin/file. The run-state argument can be a single run state, or it can be two run states separated by either the word or or the word and. If two run states are specified with the or keyword, itruns checks for (and creates, if necessary) a directory whose name combines both run states and places a link in that directory so that the file will be executed when the it program detects either state. You can collapse two or-sepa- rated states into a single expression; for example, 2 or 3 can be expressed as 23. If the and keyword is used, itruns checks for (and cre- ates, if necessary) two separate directories and places a link in each of them so that either state triggers execution of the file indepen- dently of the other state. If two or more files are specified for a single run-state argument, links are created for all of the files as indicated by the run-state argument. If two or more combinations of files and run states are specified as comma-separated expressions, itruns treats each combination individu- ally. RESTRICTIONS
The itruns command must be executed from the root directory (/). The command finds only files that are located in the /sbin/it.d/bin direc- tory. EXAMPLES
This example sets up the doconfig script to be run when the system is booted to run state 2: itruns doconfig in 2 Either of the command lines in this example sets up the doconfig and getdate scripts to be run when the system is booted to run state 2 or to run state 3: itruns doconfig getdate in 2 or 3 itruns doconfig getdate in 23 This example sets up the doconfig script to be run when the system is booted to run state 2 and again when the system comes to run state 3, the getdate script to be run only in run state 2, and the getsysname script to be run only in run state 3: itruns doconfig in 2 and 3, getdate in 2, getsysname in 3 SEE ALSO
Commands: it(8) itruns(8)
All times are GMT -4. The time now is 02:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy