Linux ‘date’ stuff I didn’t know until recently.

I’ve been using Linux for a long time but I had no idea you could do this.

evan@evbox:~$ date -d yesterday
Thu Jul 25 12:44:39 EDT 2013
evan@evbox:~$ date -d '42 days ago'
Fri Jun 14 12:44:51 EDT 2013
evan@evbox:~$ date -d '65 minutes ago'
Fri Jul 26 11:41:18 EDT 2013

As epoch:

evan@evbox:~$ date -d '65 minutes ago' +%s


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: