LoginSignup
0
0

More than 1 year has passed since last update.

Mac | can not use date-date '1 day ago' on console

Last updated at Posted at 2019-04-16

Solution

The Mac does not contain the GNU version of the command. I'll put it in brew.

 $ brew install coreutils 

gdate will be available.

 $ gdate --date '1 day ago' Sun May 1 12:44:19 JST 2016 

problem

The options available on Linux were not available on the Mac.

 $ date -d '1 day ago' [master] usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] 

reference

Original by

Mac | コンソールで date --date '1 day ago' が使えない

About

About this translattion

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0