Riding, behind;
Date command:
We can come to man. Date command, which can be seen in the meaning of date-print or set the system date and time, we illustrate the date command from the following aspects.
1. Show Time
Date[option] ... [+format]
format : Format Symbols
%d :
%F :
%T :
Enter a separate date command on the screen to display the system time:
650) this.width=650; "title=" 22f21a8dae6f60a181caf7d1fe569d9.png "src=" https://s3.51cto.com/wyfs02/M02/9E/13/ Wkiom1mk0syhqdxzaaahojjif8e037.png-wh_500x0-wm_3-wmp_4-s_2786130375.png "alt=" Wkiom1mk0syhqdxzaaahojjif8e037.png-wh_50 "/>
We can also display the time display format we want:
650) this.width=650; "title=" 547f059bf2da0a69dbcbb31bdd93a38.png "src=" https://s3.51cto.com/wyfs02/M02/9E/12/ Wkiol1mk0ujikctwaaaig-hmqpc844.png-wh_500x0-wm_3-wmp_4-s_3143196561.png "alt=" Wkiol1mk0ujikctwaaaig-hmqpc844.png-wh_50 "/>
2. set the time
Date[-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]
MM: Month
DD: What date
hh: hours
mm: minutes
YY: Two-bit year
CCYY: four-bit year
. SS: seconds
The following example shows the process of modifying a time using the date command:
650) this.width=650; "title=" Edc687be76d04378871d8ced12dab9a.png "src=" https://s4.51cto.com/wyfs02/M00/9E/13/ Wkiom1mk0vuamappaaa_dqkm0bq989.png-wh_500x0-wm_3-wmp_4-s_3820756507.png "alt=" wKiom1mK0vuAMappAAA_ Dqkm0bq989.png-wh_50 "/>
Linux Two kinds of clocks
System clock: The timing of the CPU operating frequency by the Linux kernel;
Hardware clock:
Hwclock : Display hardware clock;
- S ,--hctosys
- W ,--SYSTOHC
Cal instruction
cal-displays a calendar Show Calendar
1. Show Calendar
Cal [-SMJY13] [[[Day] month] year]
Enter a separate CAL directive on the screen to display the calendar for the current system time Month:
650) this.width=650; "title=" 339456a25983710423015e3917eb498.png "src=" https://s1.51cto.com/wyfs02/M01/9E/12/ Wkiol1mk0xwiltftaaarn-treyu160.png-wh_500x0-wm_3-wmp_4-s_3184165288.png "alt=" Wkiol1mk0xwiltftaaarn-treyu160.png-wh_50 "/>
You can also display calendars for a full year and any month of any year:
650) this.width=650; "title=" 91e1f34c94421bb6b6b2837c4642591.png "src=" https://s4.51cto.com/wyfs02/M01/9E/12/ Wkiol1mk0_ucyoxgaaccaqp2r9m203.png-wh_500x0-wm_3-wmp_4-s_1470295419.png "alt=" wKioL1mK0_ Ucyoxgaaccaqp2r9m203.png-wh_50 "/>
650) this.width=650; "title=" C9a20d3a76acbd1edbb8f3a7cfb8e7c.png "src=" https://s2.51cto.com/wyfs02/M00/9E/13/ Wkiom1mk1cuxssx7aaarg-skxwe977.png-wh_500x0-wm_3-wmp_4-s_3642757702.png "alt=" Wkiom1mk1cuxssx7aaarg-skxwe977.png-wh_50 "/>
Directory Management Class command: CD pwd ls mkdir rmdir tree
mkdir :
mkdir-make Directories Create a directory
mkdir [OPTION] ... DIRECTORY ...
- P : does not error when present, and automatically creates the required directories;
- v : Displays detailed information;
- m MODE : Specify permissions directly when creating a directory
650) this.width=650; "title=" 451d790e909cbe89160df062597f1c1.png "src=" https://s2.51cto.com/wyfs02/M02/9E/13/ Wkiom1mk1gwjdprsaab_jw03izm195.png-wh_500x0-wm_3-wmp_4-s_3179669606.png "alt=" wKiom1mK1GWjDPrSAAB_ Jw03izm195.png-wh_50 "/>
Tree :
tree-list contents of directories in a tree-like format. The contents of the display directory are in the form of a tree
tree [-ADFGHILNOPQRSTUVXACDFNS] [-llevel [-R]] [-H basehref] [-t title] [-o filename]
[--nolinks] [-P pattern] [-I pattern] [--inodes] [--device] [--noreport] [--dirsfirst]
[--version] [--help] [--filelimit #] [Directory ...]
- D : Displays only directories;
- L: Specifies the number of levels displayed;
- P Pattern : Displays only the path that is matched by the specified pattern;
650) this.width=650; "title=" 6fa0854870c370bc503f8ad39267cd6.png "src=" https://s3.51cto.com/wyfs02/M01/9E/13/ Wkiom1mk1i6jsilfaaahfwjay_y475.png-wh_500x0-wm_3-wmp_4-s_2285354576.png "alt=" wKiom1mK1I6jSiLFAAAhFwJAY_ Y475.png-wh_50 "/>
rmdir :
Rmdir-remove Empty Directories removing an empty directory
rmdir [OPTION] ... DIRECTORY ...
- v : Display Process
650) this.width=650; "title=" 86802184a8b8724b861dba035610229.png "src=" https://s1.51cto.com/wyfs02/M02/9E/13/ Wkiol1mk1njjlurhaaapfnodsdw684.png-wh_500x0-wm_3-wmp_4-s_4117300075.png "alt=" Wkiol1mk1njjlurhaaapfnodsdw684.png-wh_50 "/>
Practice:
(1) How to create/tmp/x/y1,/tmp/x/y2,/tmp/x/y1/a,/tmp/x/y1/b,/tmp/x/y2/a,/tmp/x/y2/b
650) this.width=650; "title=" Eafc928a637f1cf6042a11cd9dac337.png "src=" https://s5.51cto.com/wyfs02/M02/9E/13/ Wkiom1mk1pow5r4qaaauy5khr40365.png-wh_500x0-wm_3-wmp_4-s_4037206398.png "alt=" Wkiom1mk1pow5r4qaaauy5khr40365.png-wh_50 "/>
(2) How to create X_m,y_m, X_n, Y_n
650) this.width=650; "title=" 3303c38330fd4c7080d100e76392640.png "src=" https://s3.51cto.com/wyfs02/M00/9E/13/ Wkiom1mk1rgrylgsaaagbcba0w8856.png-wh_500x0-wm_3-wmp_4-s_1521819005.png "alt=" Wkiom1mk1rgrylgsaaagbcba0w8856.png-wh_50 "/>
(3) How to create/tmp/bin,/tmp/sbin,/tmp/usr,/tmp/usr/bin,/tmp/usr/sbin
650) this.width=650; "title=" 9a2fc931464186c2c92e4aa80d70cd4.png "src=" https://s1.51cto.com/wyfs02/M01/9E/13/ Wkiol1mk1spxrpv4aaauzt3jlfs819.png-wh_500x0-wm_3-wmp_4-s_1136934167.png "alt=" Wkiol1mk1spxrpv4aaauzt3jlfs819.png-wh_50 "/>
Linux Self-study note-Basic command date,cal, etc.