91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Linux系統中date命令的使用實例

發布時間:2021-08-03 17:53:31 來源:億速云 閱讀:148 作者:chen 欄目:系統運維

本篇內容主要講解“Linux系統中date命令的使用實例”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“Linux系統中date命令的使用實例”吧!

date用法1:

       格式:date [OPTION]... [+FORMAT]

       FORMAT controls the output.  Interpreted sequences are:


       %%     a literal %

       %a     locale's abbreviated weekday name (e.g., Sun)      

       %A     locale's full weekday name (e.g., Sunday)

       %b     locale's abbreviated month name (e.g., Jan)

       %B     locale's full month name (e.g., January)

       %c     locale's date and time (e.g., Thu Mar  3 23:05:25 2005)

       %C     century; like %Y, except omit last two digits (e.g., 20)

       %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, space padded ( 0..23); same as %_H


       %l     hour, space padded ( 1..12); same as %_I


       %m     month (01..12)


       %M     minute (00..59)


       %n     a newline


       %N     nanoseconds (000000000..999999999)


       %p     locale's equivalent of either AM or PM; blank if not known


       %P     like %p, but lower case


       %r     locale's 12-hour clock time (e.g., 11:11:04 PM)


       %R     24-hour hour and minute; same as %H:%M


       %s     seconds since 1970-01-01 00:00:00 UTC


       %S     second (00..60)


       %t     a tab


       %T     time; same as %H:%M:%S


       %u     day of week (1..7); 1 is Monday


       %U     week number of year, with Sunday as first day of week (00..53)


       %V     ISO week number, with Monday as first day of week (01..53)


       %w     day of week (0..6); 0 is Sunday

       %W     week number of year, with Monday as first day of week (00..53)


       %x     locale's date representation (e.g., 12/31/99)


       %X     locale's time representation (e.g., 23:13:48)


       %y     last two digits of year (00..99)


       %Y     year


       %z     +hhmm numeric time zone (e.g., -0400)


       %:z    +hh:mm numeric time zone (e.g., -04:00)


       %::z   +hh:mm:ss numeric time zone (e.g., -04:00:00)


       %:::z  numeric time zone with : to necessary precision (e.g., -04, +05:30)


       %Z     alphabetic time zone abbreviation (e.g., EDT)


       By default, date pads numeric fields with zeroes.  The following optional flags may follow `%':


       -      (hyphen) do not pad the field


       _      (underscore) pad with spaces


       0      (zero) pad with zeros


       ^      use upper case if possible


       #      use opposite case if possible

例如:

1.年月日

代碼如下:


$ date +%Y%m%d
20150107


2.年月日,年只保留后兩位

代碼如下:


~$ date +%y%m%d
150107


3.小時分鐘秒

代碼如下:


~$ date +%H%M%S
233045


4.年月日時分秒

代碼如下:


~$ date +%Y%m%d%H%M%S
20150107233145

到此,相信大家對“Linux系統中date命令的使用實例”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

韩城市| 五台县| 类乌齐县| 即墨市| 高安市| 栖霞市| 龙门县| 濮阳市| 揭西县| 伊金霍洛旗| 休宁县| 嘉义市| 洪江市| 兰西县| 平塘县| 五大连池市| 法库县| 高雄县| 肥西县| 洪江市| 镇远县| 临潭县| 论坛| 正定县| 鹤峰县| 昆明市| 南乐县| 布拖县| 五峰| 芮城县| 河北区| 收藏| 水城县| 新源县| 察雅县| 陆川县| 南雄市| 福建省| 三都| 沅江市| 乌拉特中旗|