10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have two dates in below format, how would I find the hours difference between the two dates. Im using AIX and ksh.
Current date : Wed May 17 14:34:41 SGT 2017
File date : Thu Apr 27 20:52:41 SGT 2017 (3 Replies)
Discussion started by: simpltyansh
3 Replies
2. Shell Programming and Scripting
I want to parse a log file which i am grepping root user connection but is showing whole day and previous day detail as well.
First i want to see last 2 hours log file then after that i want to search particular string. Lets suppose right now its 5:00PM, So i want to see the log of 3:00PM to... (6 Replies)
Discussion started by: learnbash
6 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am trying to print the dates that falls between 2 date variables into a file. Here is the example.
$BUS_DATE =20120616
$SUB_DATE=20120613
Output to file abc.txt should be : 20120613,20120614,120120615,20120616
Can you pls help me accomplish this in LINUX.
Thanks... (5 Replies)
Discussion started by: dsfreddie
5 Replies
4. Shell Programming and Scripting
shell: #!/bin/ash
I searched and found a few relevant posts (here and here - both by porter, on the same day (?)) however both are just a do while loop, I need to check a file date and compare it to the current time.
I would like it to say if file 'test' is more than 12 hours old than "right... (3 Replies)
Discussion started by: phdeez
3 Replies
5. Shell Programming and Scripting
hi,
I want to find a file which is modified within last 2 hours
i am using sun-os
i tried find . -name <filename> -mmin 120
i found that mmin option is not supported in sun-os is there any other alternative option
suggestions welcome
thanks in advance (5 Replies)
Discussion started by: trichyselva
5 Replies
6. Shell Programming and Scripting
Hi Frens,
I want to list some files from a directory, which contains "DONE" in their name, i am receiving files every minute. In this i want to list all the files which are newer than 6 hours but older than 3 hours, of current time
i dont want my list to contain the latest files which are ... (4 Replies)
Discussion started by: Prat007
4 Replies
7. Shell Programming and Scripting
Hello friends,
I am looking for a script or method that can display all the dates between any 2 given dates.
Input:
Date 1
290109
Date 2
010209
Output:
300109
310109
Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies
8. UNIX for Dummies Questions & Answers
which out of atime, ctime, or mtime are the closest to diplaying only the files created within the last 24 hours. is it even possible to find only the files created in the last 24 hours, because I heard that unix files don't hold the creation time as a property of the file. (3 Replies)
Discussion started by: raidkridley
3 Replies
9. Shell Programming and Scripting
Hi there,
I am trying to find out a way to calculate how many hours are between 2 dates but from a specific time range, actually working hours (Monday to Friday 09:00 - 18:00).
What I mean is for example
date1 = Monday 21 July 2008 22:00:00 so in python 2008-07-21 22:00:00
date2 = Wednesday... (5 Replies)
Discussion started by: sickboy
5 Replies
10. Shell Programming and Scripting
I'm looking to pull the last 24 hours of a log file.
Here's what I've got so far:
yesterday=$(TZ=$TZ+24 date +"%b %e %H:%M")
today=$(date +"%b %e %H:%M")
echo $yesterday $today
grep -E "^$yesterday|^$today" /var/adm/syslog/syslog.log
But that pulls everything from $yesterday from... (1 Reply)
Discussion started by: Bert
1 Replies