Home > linux基础 > date日期命令


更多用法见man date

[[email protected] ~]$ date
Tue Sep 29 11:42:40 UTC 2015
[[email protected] ~]$ date +%Y/%m/%d
[[email protected] ~]$ date +%H:%M

别的参数,可以man date查看:

%d day of month (e.g, 01)

%D date; same as %m/%d/%y

%e day of month, space padded; same as %_d

%F full date; same as %Y-%m-%d

%g last two digits of year of ISO week number (see %G)

%G year of ISO week number (see %V); normally useful only with %V

%h same as %b

%H hour (00..23)

%I hour (01..12)

%j day of year (001..366)

%k hour ( 0..23)

%l hour ( 1..12)

%m month (01..12)

%M minute (00..59)

%n a newline

%N nanoseconds (000000000..999999999)


若非注明,本博客内容均为原创或翻译自Linode Library,教程默认Centos为linux发行版,转载请注明转自linode中文教程www.linode.im。linode中文教程QQ群:185393826,一起讨论linode及linux,linode中文教程、linode代购、linode合租、linode推介、linode返佣、linode优惠。日本VPS、美国VPS、海外独立服务器代购均在linode.im。

Categories: linux基础 Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.