Sponsored Content
Top Forums Shell Programming and Scripting Day/Hour diff between two date Post 302951239 by sea on Tuesday 4th of August 2015 08:32:22 AM
Old 08-04-2015
Are you sure its the only available date on your system?
Code:
find / -name date 2>/dev/zero

2004 seems rather old to me.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Unix Script for getting date and validating just Hour

Hi, Can someone guide me to write a unix script for getting a hour out of a date command and validating hour to see if its > 7 and < 16. if hours is >7 and <16 then assign a variable value of 0730 and if hour is >16 then assign a variable value of 1630? Help appreciated. Thanks in advance.... (9 Replies)
Discussion started by: zulfikarmd
9 Replies

3. Shell Programming and Scripting

Compare file timestamp with current date. Diff must be 1 hour.

Hello, I've created the script below to compare the content of two files with a delay of an hour. After an hour, the lines that exist in both files, will be printed and executed. The script now uses a counter to countdown 50 minutes. But what I would prefer is to check the file timestamp of... (3 Replies)
Discussion started by: taipan
3 Replies

4. Shell Programming and Scripting

how to obtain date and day of the week from `date` command

Hi, does anybody know how to format `date` command correctly to return the day of the week? Thanks -A I work in ksh.... (1 Reply)
Discussion started by: aoussenko
1 Replies

5. Shell Programming and Scripting

Generate last hour date in YYYYmmddHH

can some one show me how to generate last hour of date for example: 2012010100 -> 2011123123 // check first date of a new year 2008030100 -> 2008022923 // check leap year as well And also no perl code is restricted. This is what i am facing issue now, can someone provides help to me. (4 Replies)
Discussion started by: alvin0618
4 Replies

6. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

7. Red Hat

Cron entry for every 10 mints on business day business hour

Could you “crontab” it to run every 10 minutes on work days (Mo - Fr) between 08:00 and 18:00 i know to run every 10 mints but can any one guide me how to achieve the above one (2 Replies)
Discussion started by: venikathir
2 Replies

8. Shell Programming and Scripting

Finding/Grep on files with date and hour in the file name

Hi, I have a folder structure as follows, DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt -> 01 -> ABC_2012-01-03_01.txt -> 02 -> ABC_2012-01-03_02.txt ... -> 23 -> ABC_2012-01-03_02.txt -> 2012-01-02 -> 2012-01-03 So the dir DATA contains the above hierarchy, User input Start and... (6 Replies)
Discussion started by: mihirvora16
6 Replies

9. AIX

Need to get the next day's date of the user entered date

I need to get the next day's date of the user entered date for example: Enter date (yyyy/mm/yy): 2013/10/08I need to get the next day's date of the user entered date Desired Output: 2013/10/09Though there are ways to achieve this is Linux or Unix environment (date command) ,I need to... (1 Reply)
Discussion started by: rpm120
1 Replies

10. UNIX for Beginners Questions & Answers

Replace date in file every day with current date

I Have text like XXX_20190908.csv.gz need to replace Only date in this format with current date every day Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies
tztab(4)						     Kernel Interfaces Manual							  tztab(4)

NAME
tztab - time zone adjustment table for date and ctime() DESCRIPTION
The file describes the differences between Coordinated Universal Time (UTC) and local time. Several local areas can be represented simul- taneously with historical detail. The file consists of one or more time zone adjustment entries. The first line of the entry contains a unique string that may match the value of the string in the user's environment. The format is where is the time zone name or abbreviation, diff is the difference in hours from UTC, and is the name or abbreviation of the "Daylight Savings" time zone. Fractional values of diff are expressed in minutes preceded by a colon. Each such string will start with an alphabetic character. The second and subsequent lines of each entry details the time zone adjustments for that time zone. The lines contain seven fields each. The first six fields specify the first minute in which the time zone adjustment, specified in the seventh field, applies. The fields are separated by spaces or tabs. The first six are integer patterns that specify the minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), year (1970-2038), and day of the week (0-6, with 0=Sunday). The minute, hour, and month of the year must contain a number in the (respective) range indicated above. The day of the month, year, and day of the week can contain a number as above or two numbers separated by a minus (indicating an inclusive range). Either the day of the month or the day of the week field must be a range, the other must be simple number. The seventh field is a string that describes the time zone adjustment in its simplest form: where is an alphabetic string giving the time zone name or abbreviation, and diff is the difference in hours from UTC. must match either the field or the field in the first line of the time zone adjustment entry. Any fractional diff is shown in minutes. Comments begin with a in the first column, and include all characters up to a newline. Comments are ignored. EXTERNAL INFLUENCES
International Code Set Support Single-byte character code sets are supported. EXAMPLES
The time zone adjustment table for the Eastern Time Zone in the United States is: Normally (as indicated in the first line) Eastern Standard Time is five hours earlier than UTC. During Daylight Savings time, it changes to a 4 hour difference. The first time Daylight Savings Time took effect (second line) was on January 6, 1974 at 3:00 a.m., EDT. Note that the minute before was 1:59 a.m., EST. The change back to standard time took effect (sixth line) on the last Sunday in November of the same year. At that point, the time went from 1:59 a.m., EDT to 1:00 a.m., EST. The transition to Daylight Savings Time since then has gone from the last Sunday in February (third line) to the last Sunday in April (fourth line) to the first Sunday in April (fifth line). The return to standard time for the same period has remained at the last Sunday in October (seventh line). AUTHOR
was developed by HP. FILES
SEE ALSO
date(1), ctime(3C), environ(5). tztab(4)
All times are GMT -4. The time now is 05:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy