Sponsored Content
Full Discussion: Find last executed timestamp
Top Forums UNIX for Dummies Questions & Answers Find last executed timestamp Post 302597120 by jim mcnamara on Thursday 9th of February 2012 08:54:56 AM
Old 02-09-2012
The last time a script was executed is the the time it was read.

If someone has gone not gone in there and done a cat on them or opened them another way, then the above statement is correct.

Code:
ls -lu

gives the last time of access (read)
 

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
SQLSRV_FREE_STMT(3)													       SQLSRV_FREE_STMT(3)

sqlsrv_free_stmt - Frees all resources for the specified statement

SYNOPSIS
bool sqlsrv_free_stmt (resource $stmt) DESCRIPTION
Frees all resources for the specified statement. The statement cannot be used after sqlsrv_free_stmt(3) has been called on it. If sql- srv_free_stmt(3) is called on an in-progress statement that alters server state, statement execution is terminated and the statement is rolled back. PARAMETERS
o $stmt - The statment for which resources are freed. Note that NULL is a valid parameter value. This allows the function to be called multiple times in a script. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 sqlsrv_free_stmt(3) example <?php $serverName = "serverNamesqlexpress"; $connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn === false ) { die( print_r( sqlsrv_errors(), true)); } $stmt = sqlsrv_query( $conn, "SELECT * FROM Table_1"); if( $stmt === false ) { die( print_r( sqlsrv_errors(), true)); } /*------------------------------- Process query results here. -------------------------------*/ /* Free the statement resources. */ sqlsrv_free_stmt( $stmt); ?> NOTES
The main difference between sqlsrv_free_stmt(3) and sqlsrv_cancel(3) is that a statement resource cancelled with sqlsrv_cancel(3) can be re-executed if it was created with sqlsrv_prepare(3). A statement resource cancelled with sqlsrv_free_statement(3) cannot be re-executed. SEE ALSO
sqlsrv_cancel(3). PHP Documentation Group SQLSRV_FREE_STMT(3)
All times are GMT -4. The time now is 08:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy