在获取猛砸日期(当前时间的前一天) [英] Get the date (a day before current time) in Bash
本文介绍了在获取猛砸日期(当前时间的前一天)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何打印这是Bash的当前时间?
How can I print the date which is a day before current time in Bash?
推荐答案
如果你有GNU日期和我正确地理解你。
if you have GNU date and i understood you correctly
$ date +%Y:%m:%d -d "yesterday"
2009:11:09
或
$ date +%Y:%m:%d -d "1 day ago"
2009:11:09
这篇关于在获取猛砸日期(当前时间的前一天)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文