Subtract 1 hour from date in UNIX shell script March 9, 2023 by Tarik The following command works on recent versions of GNU date: date -d '1 hour ago' "+%m/%d/%Y -%H:%M:%S"