Date is a command line utility for printing or setting the date and time.

learn more… | top users | synonyms

5
votes
3answers
1k views

Fast way to build a test file with every second listed in YYYY-mm-dd HH:MM:SS format

I want to create a large test file with lines containg dates listed by the second, but my method is taking inordinately long... (or at least, that's how it feels :) ... 43 minutes to create only ...
8
votes
6answers
6k views

date, get current 15 minute interval

Is there any way I can get the current 15 minute interval using the date command or similar ? e.g. something like date %Y.%m.%d %H:%M will give me 2011.02.22 10:19 , I need something that yields ...
8
votes
2answers
661 views

date - years prior to 1901 are treated as invalid

I have date (GNU coreutils) 7.1 installed on my system. If I try to check dates prior to 14-Dec-1901, I get an "invalid date" error. For example, $ date -d 1901-12-13 date: invalid date ...
4
votes
2answers
5k views

How to get elapsed time from two “text based” dates

I would like to know if there is a way to calculate the difference between two times in bash. I have two fields that are extracted from a log file: Start time: Feb 12 10:02:10 End time: Feb 12 ...
5
votes
3answers
2k views

Installation date of Ubuntu

How can I determine when Ubuntu was installed in my computer? There was a different question posted here, but none of them is helpful.
5
votes
1answer
3k views

Calculate the date from 1125 days ago on non-GNU systems?

On the Unix Bash commandline, I want to calculate the date from 1125 days ago using the base operating system (e.g. No Perl or Python). On systems running GNU Date, I can do something like this: ...
19
votes
5answers
19k views

How do I convert an epoch timestamp to a human readable format on the cli?

How do I convert an epoch timestamp to a human readable format on the cli? I think there's a way to do it with date but the syntax eludes me (other ways welcome).
16
votes
9answers
9k views

Tool in UNIX to subtract dates

Is there any tool in Solaris UNIX (so no GNU tool available) to subtract dates? I know that in Linux we have gawk that can subtract one date from another. But in Solaris the maximum we have is nawk ...
23
votes
10answers
3k views

Year 2038 problem

What is the likelihood of the Year 2038 issue being very problematic?
3
votes
1answer
1k views

rsync time comparison - what's the precision of the Modified times comparison

I'm doing some synching with rsync using: rsync --rLvv --times --size-only For my initial sync. My idea, now is to use: rsync --rLvv --times To synch files that have a new modified time. ...