by Devin Yang
(This article was automatically translated.)

Published - 8 years ago ( Updated - 8 years ago )

The command is different on MacOS or Linux, but can achieve the same effect.
Let's see how to display yesterday's date with the date command.

On MacOS, we pass the following command:
date -v -1d +'%Y-%m-%d'

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

Tags: linux cli

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,docker,wifi

Use docker to build a WPA2/EAP enterprise Radius authentication server, and the backend uses a mysql database

AP provides WPA2/EAP function, but it won't work? This article introduces how I can quickly build a Radius server through docker's ubuntu:21.04 image. Related applications such as WPA2/EAP of Wifi.

linux,termux

how to play mp4 or webm in android phone background

I have some audio files downloaded from Youtube that I want to play in the background, do I know how to do it?

linux, python, colab

How to connect to colab from our Server through ssh?

Introduce a bash I wrote to connect to colab vm through ssh. One line of instructions, get colab OpenSSH Server.