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'
date -v -1d +'%Y-%m-%d'
date -d 'yesterday' +'%Y-%m-%d'
Not sure who will use it, but I encountered it myself, because my home is a floating IP. A software I installed cannot detect that the ppp0 network card is an external network, so changing the name can trick him into successfully installing it.
Sometimes we need to generate a random password, but do not know what to use? Here is a simple bash that allows us to easily generate a set of passwords on the terminal.
Sometimes it is necessary to generate an ssh key pair for automatic configuration. There is no password query in the command line, and an ssh key pair is generated.
No Comment
Post your comment