I think I have a fix for my code above. Try this:
FOLDER is the folder that you want to look in.
FILE is the most recent file matching your pattern: Long list all files in FOLDER and sort by time. Pipe to awk. Print the last field with files that match the pattern "^Test". Pipe to head. Print the first entry.
FILE_TIME is the number of seconds past a universal date that I don't recall.
NOW_TIME is the number of seconds past that date until now.
Then print the difference of the two times divided by 60.
Note that my code might not work properly if no file matches the pattern.
How can I get difference date between today and 15 days ago and all filename is was created before 15 days ago?
It has to be korn shell script.
Thanks. (1 Reply)
Hi
Can some one please help me
How can i search a file which has been created or modified in last five minutes
I have used the command
find . -mmin -5
and it does not work
i get an error -mmin is bad option
Please help
Much regards
Tarun (2 Replies)
Hello,
RHEL5.5
PYTHON=2.4.3
I have 2 python variables using the datetime module.
Here is how I call them:
print "Current Time: %s" % now
print "LastDownloadTime: %s" % LastDownloadTime
Here is an example of an issue.
Current Time: 2012-01-05 14:06:09.749240... (2 Replies)
I wanted to send an email to the client whenever there is failed record created in a /feed/HR-76/failed folder after processing of feed file.
I can find out with the help of below script that what is the new file created but that file didn't make just 15 minutes before.
... (1 Reply)
Hello all,
Info:
System RedHat 7.5
I need to create a script that based on the creation time,
if the file is older then 5 minutes then execute some stuff, if not exit.
I thought to get the creation time and minutes like this.
CreationTime=$(stat -c %y /tmp/test.log | awk -F" " '{ print... (3 Replies)
A process xyz is running and creating file1, file2, file3, .... filen. how do i know if the process has stopped and createtime of the last file (filen) is older than 5 minutes?
OS is AIX (3 Replies)
- run a backup job
- The jobs creates partial files one after the other, about 2 minutes interval.
What i want to do is that while the job is still running or while a file was last modified or created 3 minutes ago, the
file should be rsync to a remote server untill the last file has been... (4 Replies)
Discussion started by: malaika
4 Replies
LEARN ABOUT DEBIAN
imgrep
IMGREP(1p) Internet Message commands IMGREP(1p)NAME
imgrep - search for mail/news messages
SYNOPSIS
imgrep [OPTIONS] [FOLDER] [RANGE]
DESCRIPTION
The imgrep command enumerates mail/news messages matched given patterns.
This command is provided by IM (Internet Message).
OPTIONS -s, --src=FOLDER,FOLDER...
message source: "+folder:[range[,range..]]".
"--src=+xxx" is equivalent to "+xxx".
-f, --format=STRING
Output format: "number", "folder", or "path".
(default: "number" for single target folder, "path" for multiple target folders)
-c, --casefold={on,off}
Case sensitivity. (This option affects both fieldname and pattern.)
Default value is "on".
-e, --expression=STRING
Search expression:
Usable keyword
& && logical AND
| || logical OR
! logical NOT
( ) parens
fieldname=pattern search pattern for the field
Special fieldname:
head Entire header
body Entire body
all Entire message
-d, --delimiter=STRING
Mail header delimiter.
Default value is "
|
----
".
-D, --dupchecktarget=STRING
Duplicate check target ('none', 'message-id', or 'message-id+subject'). Default value is 'none'.
-q, --quiet={on,off}
Do not show any messages.
-v, --verbose={on,off}
Print verbose messages when running.
--debug=DEBUG_OPTION
Print debug messages when running.
-h, --help
Display help message and exit.
--version
Output version information and exit.
COPYRIGHT
IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See
the copyright file for more details.
IM151 2011-05-25 IMGREP(1p)