06-08-2010
Identify age of the file.
Hi all,
I'm using SunOS.
need to find age of the file in terms of seconds. The file
name with its path will be given to the script as input.
Any kinda help will be appreciated.
Thanks in advance
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to know my file is 1 hr 30 min old or not,
If 1 hr 30 min old I will do some tasks in that file.. other wise I will wait to 1 hr 30 min and then do the tasks.. how to do it in Unix script? any idea? (3 Replies)
Discussion started by: redlotus72
3 Replies
2. Shell Programming and Scripting
KSH:
Please lt me know how to find the age of a file in minutes(Based on last modified time).
ie, if the file was modified 15 Minutes ago, the output should be 15 (1 Reply)
Discussion started by: hari_anj
1 Replies
3. Shell Programming and Scripting
How can I count the age of the file (e.g. in minutes)? (4 Replies)
Discussion started by: jarmo.leppanen
4 Replies
4. Shell Programming and Scripting
Hi,
(AIX 5.1)
Is there any way to find the epoch timestamp for a file without having to use fancy perl (or similar) scripts? If anyone knows of a way to do this using just ksh commands it would be appreciated.
(It also appears I don't have the stat command available).
Alternatively is... (3 Replies)
Discussion started by: b0bbins
3 Replies
5. Shell Programming and Scripting
Hi
I can not say that i am new to perl but today i learned something new, i wanted to know age (last time file got modified) of file so i initially thought of using find -mtime command but when i googled it, i found perl solution for the same
my $age = -M $ARGV ;
print "$ARGV age is... (1 Reply)
Discussion started by: zedex
1 Replies
6. Shell Programming and Scripting
I am using AIX 6.1 and would like to use a one line command to determine the age of a file in days. I would like to look at a specific file.
I would like to use the command to run on a remote server (AIX 6.1) to return the age of a specific file in days. So if the file is 42 days old I would... (2 Replies)
Discussion started by: oldman2
2 Replies
7. Shell Programming and Scripting
Hello all,
Below is scripts to find the file following by:
30 days <- How many total file space within 30 days and not quantity
90 days
120 days
1 year
From here also I can get data space to put on PIE Chart. Following this scripts can I do some enhance from this scripts like do... (1 Reply)
Discussion started by: sheikh76
1 Replies
8. Shell Programming and Scripting
I have a very large system generated file containing around 500K rows size 100MB like following
HOME|ALICE STREET|3||NEW LISTING
HOME|NEWPORT STREET|1||NEW LISTING
HOME|KING STREET|5||NEW LISTING
HOME|WINSOME AVENUE|4||MODIFICATION
CAR|TOYOTA|4||NEW LISTING
CAR|FORD|4||NEW... (9 Replies)
Discussion started by: jubaier
9 Replies
9. Shell Programming and Scripting
hi,
i am working on a shell script where i have 2 files & i need to check age of those files. one file should be of the same day and other shoudn't be more then 20 days old.
how could i acheive this? please help!!!! (10 Replies)
Discussion started by: lovelysethii
10 Replies
10. UNIX for Dummies Questions & Answers
Hi All..
Is there any easy way to find out how many days older is file?
for ex. fileA 20 days
fileB 10 days
I am currently on AIX, and there is no STAT command available in this environment. What are my options?
Thanks
Abhijeet R (1 Reply)
Discussion started by: freakabhi
1 Replies
LEARN ABOUT SUSE
ocf_heartbeat_sapinstance
OCF_HEARTBEAT_SAPINS(7) OCF resource agents OCF_HEARTBEAT_SAPINS(7)
NAME
ocf_heartbeat_SAPInstance - Manages a SAP instance
SYNOPSIS
SAPInstance [start | stop | status | monitor | promote | demote | validate-all | meta-data | methods]
DESCRIPTION
Resource script for SAP. It manages a SAP Instance as an HA resource.
SUPPORTED PARAMETERS
InstanceName
The full qualified SAP instance name. e.g. P01_DVEBMGS00_sapp01ci (required, string, no default)
DIR_EXECUTABLE
The full qualified path where to find sapstartsrv and sapcontrol. (optional, string, no default)
DIR_PROFILE
The full qualified path where to find the SAP START profile. (optional, string, no default)
START_PROFILE
The name of the SAP START profile. (optional, string, no default)
START_WAITTIME
After that time in seconds a monitor operation is executed by the resource agent. Does the monitor return SUCCESS, the start is handled
as SUCCESS. This is useful to resolve timing problems with e.g. the J2EE-Addin instance. (optional, string, default 3600)
AUTOMATIC_RECOVER
The SAPInstance resource agent tries to recover a failed start attempt automaticaly one time. This is done by killing runing instance
processes and executing cleanipc. (optional, boolean, default false)
MONITOR_SERVICES
(optional, string, default disp+work|msg_server|enserver|enrepserver|jcontrol|jstart)
ERS_InstanceName
(optional, string, no default)
ERS_START_PROFILE
(optional, string, no default)
PRE_START_USEREXIT
The full qualified path where to find a script or program which should be executed before this resource gets started. (optional,
string, no default)
POST_START_USEREXIT
The full qualified path where to find a script or program which should be executed after this resource got started. (optional, string,
no default)
PRE_STOP_USEREXIT
The full qualified path where to find a script or program which should be executed before this resource gets stopped. (optional,
string, no default)
POST_STOP_USEREXIT
The full qualified path where to find a script or program which should be executed after this resource got stopped. (optional, string,
no default)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 180.
stop
Stops the resource. Suggested minimum timeout: 240.
status
Performs a status check. Suggested minimum timeout: 60.
monitor
Performs a detailed status check. Suggested minimum timeout: 60. Suggested interval: 120.
promote
Promotes the resource to the Master role. Suggested minimum timeout: 320.
demote
Demotes the resource to the Slave role. Suggested minimum timeout: 320.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 5.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
methods
Suggested minimum timeout: 5.
EXAMPLE
The following is an example configuration for a SAPInstance resource using the crm(8) shell:
primitive example_SAPInstance ocf:heartbeat:SAPInstance
params
InstanceName=string
op monitor depth="0" timeout="60" interval="120"
SEE ALSO
http://www.linux-ha.org/wiki/SAPInstance_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_SAPINS(7)