date of a specific past day


 
Thread Tools Search this Thread
Operating Systems Linux date of a specific past day
# 8  
Old 09-27-2012
thanks for the help
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calculate specific past date

Hello All, I use date like the following in one of my scripts: date=`TZ=GMT+2 date +%Y-%m-%d` => gives 2016-04-20 I want to use just one argument to my script such as number of days which represents "how old the found files are" such as "14" means I need to find 14 days old files to... (7 Replies)
Discussion started by: EAGL€
7 Replies

2. Shell Programming and Scripting

Touch a file with creation date as 30 min past.

Hi All, I would like to create a file say test.txt. And the requirement is its creation date should be 30 minutes past. For Example : If i am creating a file at 2:00 am means. Creation time should be 01:30 am. likewise if i am creating a file at 5 pm means. Creation date should be... (5 Replies)
Discussion started by: Girish19
5 Replies

3. Shell Programming and Scripting

Seven days past date from current date

hi all.. i want 2 know how 2 find 7days past date from current date.. when i used set datetime = `date '+%m%d%y'` i got 060613.. i just want to know hw to get 053013.. i tried using date functions but couldnt get it :( i use c shell and there is no chance that i can change that ..... (3 Replies)
Discussion started by: Rahul619
3 Replies

4. Solaris

CPU Utilisation for Past 1 day

Hi, Can anyone tell me how to get the CPU utilisation for past 1 day in Solaris. Below is the version i m using SunOS ss1qeb 5.10 Generic_138889-03 i86pc i386 i86pc thanks in advance (2 Replies)
Discussion started by: ali560045
2 Replies

5. Shell Programming and Scripting

Get Previous date of a past date

Hi all, I have a variable where it has a past date value in the format YYYY-MM-DD eg-> pcontromModate="2008-11-31" How can i get the date 1 day before the pcontromModate. The required date is 2008-11-30. ..Plz reply since its an urgent one (2 Replies)
Discussion started by: morbid_angel
2 Replies

6. Shell Programming and Scripting

How to view files from a specific date/day

I wan to view files in a directory of a specific date. For example a log directory has log files . I want to view the list of the files which were generated on 01-May-2011. Is there any option/proces to perform it?? (1 Reply)
Discussion started by: mady135
1 Replies

7. Shell Programming and Scripting

How to find a date which is 7 days past when given current date

hii all. I have to get the date of the 7th day past from the current date. if i give the current date as sep 3 then i must get the date as 27th of august. can we get the values from the "cal" command. cal | awk '{print $2}' will this type of command work. actually my need is if today is... (17 Replies)
Discussion started by: ladtony
17 Replies

8. Shell Programming and Scripting

Converting past date to seconds

Need a little help developing a ksh script. Have read through Perderabo's datecalc routine and it does not seem to fit the function I am looking for. Basically what I am trying to do is find any file (in a specific directory) that was created within the last five minutes. I am not a programming... (3 Replies)
Discussion started by: synergy_texas
3 Replies

9. Shell Programming and Scripting

Past date display ( today - N) in shell

Hi, Any idea to get display of date - n ( n=1,2,3,4 etc) ? For example , dtoudt will easily execute by dtoudt -3 and result is >dtoudt -3 1234852529 Date 2009-2-17 time 14:35:29 day 47 How to get it display in 20090217 instead ? Maybe you have other suggestion to display date... (0 Replies)
Discussion started by: rauphelhunter
0 Replies

10. Shell Programming and Scripting

Get date and time for past 1 hour from current date

Hi, I need to get the date and time for past 1 hour from the current date. Anyone know how to do so? Thanks (5 Replies)
Discussion started by: spch2o
5 Replies
Login or Register to Ask a Question
DDATE(1)						    Emperor Norton User Command 						  DDATE(1)

NAME
ddate - convert Gregorian dates to Discordian dates SYNOPSIS
ddate [+format] [date] DESCRIPTION
ddate prints the date in Discordian date format. If called with no arguments, ddate will get the current system date, convert this to the Discordian date format and print this on the stan- dard output. Alternatively, a Gregorian date may be specified on the command line, in the form of a numerical day, month and year. If a format string is specified, the Discordian date will be printed in a format specified by the string. This mechanism works similarly to the format string mechanism of date(1), only almost completely differently. The fields are: %A Full name of the day of the week (i.e., Sweetmorn) %a Abbreviated name of the day of the week (i.e., SM) %B Full name of the season (i.e., Chaos) %b Abbreviated name of the season (i.e., Chs) %d Ordinal number of day in season (i.e., 23) %e Cardinal number of day in season (i.e., 23rd) %H Name of current Holyday, if any %N Magic code to prevent rest of format from being printed unless today is a Holyday. %n Newline %t Tab %X Number of days remaining until X-Day. (Not valid if the SubGenius options are not compiled in.) %{ %} Used to enclose the part of the string which is to be replaced with the words "St. Tib's Day" if the current day is St. Tib's Day. %. Try it and see. EXAMPLES
% ddate Sweetmorn, Bureaucracy 42, 3161 YOLD % ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H' Today is Sweetmorn, the 42nd of Bureaucracy, 3161. % ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995 It's Prickle-Prickle, the 50th of Bureaucracy, 3161. Celebrate Bureflux % ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996 Today's St. Tib's Day, 3162. BUGS
ddate(1) will produce undefined behavior if asked to produce the date for St. Tib's day and its format string does not contain the St. Tib's Day delimiters %{ and %}. NOTE
After `X-Day' passed without incident, the Church of the SubGenius declared that it had got the year upside down - X-Day is actually in 8661 AD rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827. AUTHOR
Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu) Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org) Five tons of flax. DISTRIBUTION POLICY
Public domain. All rites reversed. SEE ALSO
date(1), http://www.subgenius.com/ Malaclypse the Younger, Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her AVAILABILITY
The ddate command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux Bureaucracy 3161 DDATE(1)