by Devin Yang

建立於: 6年前 ( 更新: 6年前 )

在MacOS或Linux上指令是不同的,但是可以達到相同的效果。
我們來看看如何用date指令顯示昨天的日期。

在MacOS,我們透過如下指令:
date -v -1d +'%Y-%m-%d'

在Linux:
date -d 'yesterday' +'%Y-%m-%d'

Tags: linux cli

Devin Yang

文章內容無法一一說明,如果您有什麼不了解處,歡迎提問哦:)

No Comment

Post your comment

需要登入才可留言!

類似的文章


linux,raspberry

樹莓派安裝VNC Server

檢單介紹如何在樹莓派上啟動VNC Server

linux

ubuntu找不到add-apt-repository指令

ubuntu找不到add-apt-repository指令

linux

如何檢查apache載入並啟用了那些modules?

如何檢查apache載入並啟用了那些modules?