Hi I want a shell script that will give me a list of files which were last accessed over a specific time ago and want it to use a variable so I can do this...
Rought Example...
Script goes off checks the entire /Share_Points for any file that was last accessed over 13 months ago.
Compiles them into a list with the access date and path to file;
I have no idea on how to achieve this and would absolutely love it if someone could help?
Last edited by Scott; 05-11-2010 at 02:25 PM..
Reason: Code tags, please...
actually, i'm making an Intrusion Detection System for education purpose (for project) using Bourne shell. The problem I get in that is:-
1. My application should check if there's some modification or alteration in the directory.
2, For that thing, I need to have every attribute of file and... (1 Reply)
when unix is logged in it access some login file depending on the shell
like .cshrc , .login , .vimrc , .bashrc
how can we know which is being access in a perticular unix flavor. (1 Reply)
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (1 Reply)
Hey,
I want to ask a simple Question....
How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (16 Replies)
How can I search for files by last accessed time? I want to see files accessed in the last 24 hours, for example...or even less time, maybe in the last 3 hours?
Thank you in advance,
Trellot (4 Replies)
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Hi
I have an ftp script which works fine when i execute through a test scheduler(UC4), but when i run it through the prod scheduler(UC4), it hungs indefinetely, when we cancel the job and re-run it it works perfectly fine. here is the code,, any idea why this is happening ????
... (1 Reply)
How can i track all the files accessed by script. The script is supposed to bring up my application and this script is just the main script which inturn calls another scripts and executable. I need to know all the the files this main script calls and the files accessed by all the other scripts... (2 Replies)
I can do an ls -l CD* and see the following CDTEST userA RW RW R and I an logged on as userA. But if I do an ls -l the file does not appear. If I do a vi CDTEST it tries to create a new file named CDTEST. If I do a mv or rm I get the message no file of name CDTEST found. Any idea what is going on.... (3 Replies)
Discussion started by: LeeT
3 Replies
LEARN ABOUT SUSE
time::parsedate
Time::ParseDate(3) User Contributed Perl Documentation Time::ParseDate(3)NAME
Time::ParseDate -- date parsing both relative and absolute
SYNOPSIS
use Time::ParseDate;
$seconds_since_jan1_1970 = parsedate("12/11/94 2pm", NO_RELATIVE => 1)
$seconds_since_jan1_1970 = parsedate("12/11/94 2pm", %options)
OPTIONS
Date parsing can also use options. The options are as follows:
FUZZY -> it's okay not to parse the entire date string
NOW -> the "current" time for relative times (defaults to time())
ZONE -> local timezone (defaults to $ENV{TZ})
WHOLE -> the whole input string must be parsed
GMT -> input time is assumed to be GMT, not localtime
UK -> prefer UK style dates (dd/mm over mm/dd)
DATE_REQUIRED -> do not default the date
TIME_REQUIRED -> do not default the time
NO_RELATIVE -> input time is not relative to NOW
TIMEFIRST -> try parsing time before date [not default]
PREFER_PAST -> when year or day of week is ambigueous, assume past
PREFER_FUTURE -> when year or day of week is ambigueous, assume future
SUBSECOND -> parse fraction seconds
VALIDATE -> only accept normal values for HHMMSS, YYMMDD. Otherwise
days like -1 might give the last day of the previous month.
DATE FORMATS RECOGNIZED
Absolute date formats
Dow, dd Mon yy
Dow, dd Mon yyyy
Dow, dd Mon
dd Mon yy
dd Mon yyyy
Month day{st,nd,rd,th}, year
Month day{st,nd,rd,th}
Mon dd yyyy
yyyy/mm/dd
yyyy-mm-dd (usually the best date specification syntax)
yyyy/mm
mm/dd/yy
mm/dd/yyyy
mm/yy
yy/mm (only if year > 12, or > 31 if UK)
yy/mm/dd (only if year > 12 and day < 32, or year > 31 if UK)
dd/mm/yy (only if UK, or an invalid mm/dd/yy or yy/mm/dd)
dd/mm/yyyy (only if UK, or an invalid mm/dd/yyyy)
dd/mm (only if UK, or an invalid mm/dd)
Relative date formats:
count "days"
count "weeks"
count "months"
count "years"
Dow "after next"
Dow "before last"
Dow (requires PREFER_PAST or PREFER_FUTURE)
"next" Dow
"tomorrow"
"today"
"yesterday"
"last" dow
"last week"
"now"
"now" "+" count units
"now" "-" count units
"+" count units
"-" count units
count units "ago"
Absolute time formats:
hh:mm:ss[.ddd]
hh:mm
hh:mm[AP]M
hh[AP]M
hhmmss[[AP]M]
"noon"
"midnight"
Relative time formats:
count "minutes" (count can be franctional "1.5" or "1 1/2")
count "seconds"
count "hours"
"+" count units
"+" count
"-" count units
"-" count
count units "ago"
Timezone formats:
[+-]dddd
GMT[+-]d+
[+-]dddd (TZN)
TZN
Special formats:
[ d]d/Mon/yyyy:hh:mm:ss [[+-]dddd]
yy/mm/dd.hh:mm
DESCRIPTION
This module recognizes the above date/time formats. Usually a date and a time are specified. There are numerous options for controlling
what is recognized and what is not.
The return code is always the time in seconds since January 1st, 1970 or undef if it was unable to parse the time.
If a timezone is specified it must be after the time. Year specifications can be tacked onto the end of absolute times.
If "parsedate()" is called from array context, then it will return two elements. On sucessful parses, it will return the seconds and what
remains of its input string. On unsucessful parses, it will return "undef" and an error string.
EXAMPLES
$seconds = parsedate("Mon Jan 2 04:24:27 1995");
$seconds = parsedate("Tue Apr 4 00:22:12 PDT 1995");
$seconds = parsedate("04.04.95 00:22", ZONE => PDT);
$seconds = parsedate("Jan 1 1999 11:23:34.578", SUBSECOND => 1);
$seconds = parsedate("122212 950404", ZONE => PDT, TIMEFIRST => 1);
$seconds = parsedate("+3 secs", NOW => 796978800);
$seconds = parsedate("2 months", NOW => 796720932);
$seconds = parsedate("last Tuesday");
$seconds = parsedate("Sunday before last");
($seconds, $remaining) = parsedate("today is the day");
($seconds, $error) = parsedate("today is", WHOLE=>1);
AUTHOR
David Muir Sharnoff <muir@idiom.com>.
LICENSE
Copyright (C) 1996-2006 David Muir Sharnoff. License hereby granted for anyone to use, modify or redistribute this module at their own
risk. Please feed useful changes back to muir@idiom.com.
perl v5.12.1 2006-08-15 Time::ParseDate(3)