How to show date one day ago (yesterdays date) in Linux?


Here are some commands:


YESTERDAY


[[email protected] ~]# date -d "1 day ago" "+%Y-%m-%d"
2015-02-22

TODAY


[[email protected] ~]# date "+%Y-%m-%d"
2015-02-23

--------------

[[email protected] ~]# date
Mon Feb 23 11:01:31 UTC 2015



[[email protected] ~]# date --date="2 days ago"
Sat Feb 21 11:02:37 UTC 2015