If you have a fixed date range (not just up to current date) you can use a combination of touch & find
For touch the date format is [[CC]YY]MMDDhhmm[.SS] where the bits in square brackets are options if you are giving the current century, year or are happy that the seconds with be zero.
So for today 16/05/2014 @ 10:45:30, if we want to go back two days and find things less than three days before that:-
This should give you two files with a date/time range. You can then use find to select the files you want:-
All the flags for find are in the manual pages, but the ones I've shown here are:-
-type f. . . . .- Find only files, not directories, pipes, soft links, devices etc.
-newer . . . . . - Find items with a modified time more recent than the referenced file
! -newer . . . .- Find items with a modified time not more recent (i.e. older) than the referenced file
I want to calculate duration for below file in this format
SID | Date | Starttime |Date |End time
1607 |2019-04-05|13:06:42|2019-04-05|13:07:12
2327 |2019-04-05|13:57:26|2019-04-05|13:57:43
O/p should be like this:
SID | Date | Starttime |Date |Endtime... (4 Replies)
Hello All,
I have two strings with date and time as follows..
$starttime= "06/11/2013 ";
$starttime= "05:15";
$enddate="06/12/2013";
$endtime="04:45";
dates are in mm/dd/yyyy format and time in military format.
and I am looking the duration of time(in minutes) in between dates.
... (3 Replies)
Oracle Enterprise Linux
We want to track how long a process takes to complete its execution. This is what we want in the schell script
Before the process is started , get the time with date, hours and minutes
execute the process
After the process has ended , get the time with date,... (5 Replies)
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
in a multi user system of 3 users X,Y,Z, if i know that X is presently online, is it possible to determine for how long has he been online? i mean the time duration (3 Replies)
Here is two time I have:
Jul 12 16:02:01
Jul 13 01:02:01
and how can I do a simple match to get difference between two time which is 09:00:00
Thanks in advance. (3 Replies)
hi everyone,
can someone suggest how i can list the contents of a directory and display their corresponding last modify time in the format yyyymmddhhmm?
thanks in advance! (16 Replies)
Hi there,
I'm using terminal on mac and using the ls -l command to list all the files in a directory. However, I only want to display the date and time stamp of each file rather than permissions, owner, group etc...
Is this possible?
Many thanks in advance
Dave (2 Replies)
Hi ,
I am trying to find out the List of files modified or added aftter installation of any component on SUN solaris box .
But i am not able to do it using ls or find command .
Can somebody help me out ?
Thanks
Sanjay Gupta (2 Replies)