Hi All,
I want to find the time diffrence between currnt time and "abc.txt" file create time.
I have solve that but if the abc.txt file created last month then is there any process to find the difftent?
Exp:
Create time of abc.txt is "Apr 14 06:48"
and currect date is "May 17 23:47".... (1 Reply)
Hi Gurus,
I've been having some problem in extracting the log data based on the current date and month.
As shown in the sample data below, how to extract the log info for Aug 11?
Sample data:
root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35)
root pts/ta userpc... (13 Replies)
Hi Gurus
I'm using HPUX B.11.23 ia64, the below sample log data was extracted from HPUX commnad: last -R.
Sample data:
root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35)
root pts/ta userpc Wed Aug 11 09:44 - 20:10 (10:34)
root pts/ta userpc Wed Aug 11... (4 Replies)
Hi,
i unable to get the last month date in AIX.
current date - one month
Based on the forums tried but did not find the relevent information.
Any help grealy appriciated.
Thanks
Suri. (3 Replies)
I have requirment to get last date of previous month and the first date of previous 4th month:
Example:
Current date: 20130320 (yyyymmdd)
Last date of previous month: 20130228 (yyyymmdd)
First date of previous 4th month: 20121101 (yyyymmdd)
In my shell --date, -d, -v switches are not... (3 Replies)
Hi,
I am trying to extract lines of data within a log file on a Redhat 5 Linux system.
eg I need all the lines with a particular username over the last 3 minutes.
the log file may read like this, and I want a way to search all the lines extracting all the relevant lines over the last 3... (2 Replies)
I am running a script in ksh to get the 2 months back date from system date.The below code is giving correct date output from putty command prompt.But while running the script is .ksh file it is giving the error below.Please suggest.
; d=a; y=a
m-=num
while(m < 1) {m+=12; y--}... (1 Reply)
Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal.
sample code:
export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies
LEARN ABOUT MINIX
date
DATE(1) General Commands Manual DATE(1)NAME
date - print or set the date and time
SYNOPSIS
date [-qsu] [[MMDDYY]hhmm[ss]] [+format]
OPTIONS -q Read the date from stdin
-s Set the time (implicit for -q or a date string)
-u Print the date as GMT
-t Use this number of seconds instead of current time
EXAMPLES
date # Print the date and time
date 0221921610 # Set date to Feb 21, 1992 at 4:10 p.m.
DESCRIPTION
With the -q flag or a numeric argument, date sets the GMT time and date. MMDDYY refers to the month, day, and year; hhmmss refers to the
hour, minute and second. Each of the six fields must be exactly two digits, no more and no less. date always display the date and time,
with the default format for the system. The -u flag request GMT time instead of local time. A format may be specified with a + followed
by a printf-like string with the following options:
%% % character
%A Name of the day
%B Name of the month
%D mm/dd/yy
%H Decimal hour on 2 digits
%I Decimal hour modulo 12 on 2 digits
%M Decimal minute on 2 digits
%S Decimal seconds on 2 digits
%T HH:MM:SS
%U Decimal week number, Sunday being first day of week
%W Decimal week number, Monday being first day of week
%X Same as %T
%Y Decimal year on 4 digits
%Z Time Zone (if any)
%a Abbreviated name of the day
%b Abbreviated name of the month
%c Appropriate date & time (default format)
%d Decimal day of the month on 2 digits
%e Same as %d, but a space replaces leading 0
%h Same as %b
%j Decimal dey of the year on 3 digits
%m Decimal month on 2 digits
%n Newline character
%p AM or PM
%r 12-hour clock time with AM/PM
%s Number of seconds since the epoch
%t Tab character
%w Decimal day of the week (0=Sunday)
%x Same as %D
%y Decimal year on 2 digits
SEE ALSO time(2), ctime(3), readclock(8).
DATE(1)