Ϣ

dateޥѤѴȡdateޥǤϹԤʤѴ˴ؤTips

dateޥ

unix timeѴ

UNIX֡UNIX timePOSIX timeˤȤ϶ (UTC) Ǥ1970ǯ1100ʬ0áUNIXݥåˤŪʷвÿȤɽ롣

  • ߤλѴ
    # date +%s
    1667119189
  • λѴ
    # date -d "2022-01-15 11:30:25" +%s
    1642213825 

dateޥ

̾ͤѴ

dateޥǤϤǤʤ褦ʤΤǡե˽ϤƤsedǽ񤭴ˡ

  • 2022/January/15 11:27:502022-01-15 11:27:50Ѵ
    sed -i "s/\/January\//-01-/g" [FILENAME]
    sed -i "s/\/February\//-02-/g" [FILENAME]
    sed -i "s/\/March\//-03-/g" [FILENAME]
    sed -i "s/\/April\//-04-/g" [FILENAME]
    sed -i "s/\/May\//-05-/g" [FILENAME]
    sed -i "s/\/June\//-06-/g" [FILENAME]
    sed -i "s/\/July\//-07-/g" [FILENAME]
    sed -i "s/\/August\//-08-/g" [FILENAME]
    sed -i "s/\/September\//-09-/g" [FILENAME]
    sed -i "s/\/October\//-10-/g" [FILENAME]
    sed -i "s/\/November\//-11-/g" [FILENAME]
    sed -i "s/\/December\//-12-/g" [FILENAME]

ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2022-10-30 () 17:40:09 (487d)