Linux date – display date one or two days ago


Warning: Undefined array key "socialize_RedditWidget" in /home/phpacd/websites/shkodenko.com/wp-content/plugins/socialize/frontend/socialize-services.php on line 166

If you need to display date one or two days ago you could use the following command in the terminal:

#!/usr/bin/evn bash

echo $(date -d '-1days' +'%Y-%m-%d') $(date -d '-2days' +'%Y-%m-%d')