Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like something like:

$ date --date="05/02/2012" "+2 days"

would give me "4 may" as output.. how ?

share|improve this question
Did you try this command? {date -d "+2 days"} – Ramesh Feb 17 '14 at 17:19
up vote 5 down vote accepted

Assuming GNU date, you have almost the right command in your question:

$ date --date="05/02/2012 +2 days"
Fri May  4 00:00:00 EEST 2012

To get the exact string 4 May, use this:

$ date --date="05/02/2012 +2 days" +"%e %b"
4 May
share|improve this answer

This will solve your problem:

date --date="05/02/2012 2 day"

You can use - to compute days before:

date --date="05/02/2012 -2 day"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.