³µÍ× †
date¥³¥Þ¥ó¥É¤òÍѤ¤¤¿ÆüÉÕÊÑ´¹¤È¡¢date¥³¥Þ¥ó¥É¤Ç¤Ï¹Ô¤¨¤Ê¤¤ÆüÉÕÊÑ´¹¤Ë´Ø¤¹¤ëTips¡£
date¥³¥Þ¥ó¥É †
unix time¤ËÊÑ´¹ †
UNIX»þ´Ö¡ÊUNIX time¡¢POSIX time¡Ë¤È¤Ï¶¨ÄêÀ¤³¦»þ (UTC) ¤Ç¤Î1970ǯ1·î1Æü¸áÁ°0»þ0ʬ0ÉáÊUNIX¥¨¥Ý¥Ã¥¯¡Ë¤«¤é·Á¼°Åª¤Ê·Ð²áÉÿô¤È¤·¤Æɽ¤µ¤ì¤ë¡£
- ¸½ºß¤Î»þ¹ï¤òÊÑ´¹
# date +%s 1667119189
- ÆÃÄê¤Î»þ¹ï¤òÊÑ´¹
# date -d "2022-01-15 11:30:25" +%s 1642213825
Èódate¥³¥Þ¥ó¥É †
·î¤Î̾Á°¤ò¿ôÃͤËÊÑ´¹ †
date¥³¥Þ¥ó¥É¤Ç¤Ï¤Ç¤¤Ê¤¤¤è¤¦¤Ê¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤ·¤¿ÆâÍƤòsed¤Ç½ñ¤´¹¤¨¤ëÊýË¡¡£
- 2022/January/15 11:27:50¡¡¢ª¡¡2022-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]
Last-modified: 2022-10-30 (Æü) 17:40:09 (688d)