date command The function of the date command is to display and set the system date and time. The general format of the command is: date [options] display time format (starting with +, followed by format) date setting the time format The meaning of each option in the command is:
The code is as follows : -d datestr, --date datestr Display the date described by datestr -s datestr, --set datestr Set the date described by datestr -u, --universal Display or set universal time
Time domain
The code is as follows: % H hours (00..23) % I hours (01..12) % k hours (0..23) % l hours (1..12) % M points (00..59 % p shows AM or PM % r time (hh:mm:ss AM or PM), 12 hours % s from January 1, 1970 00:00:00 to the current number of seconds % S seconds (00. .59) % T time (24-hour clock) (hh:mm:ss) % X Display time format (%H:%M:%S) % Z Time zone date field % a Short for day of the week ( Sun..Sat % A Full name of the day of the week (Sunday..Saturday) Abbreviation for the month of January (Jan..Dec) % Full name of the month of January (January..December) % c Date and time ( Mon Nov 8 14:12:46 CST 1999) % d The first few days of the month (0 1..31) % D Date (mm/dd/yy) % h and %b options are the same % j Day of the year (001..366) % m Month (01..12) % w One week Days (0 for Sunday) % W The first few weeks of the year (00..53, Monday is the first day) % x Display the format of the date (mm/dd/yy) % y The last two of the year Number (1999 is 99) % Y year (for example: 1970, 1996, etc.)
Note: Only superusers have permission to set the time using the date command. Generally, users can only use the date command to display the time. Displaying the date and time In the character interface, in addition to displaying the year and month, the user can also use the “date” command to display and set the system date and time. It is important to note that only superusers can use the “date” command to set the time. Normal users can only use the “date” command to display the time. Display format specified time, the following command:
% x wherein the date display format (mm /dd /yy),% X time display format (% H: %M:%S). Other parameters can be found in the setting of the date time field above.
Example:
Code Example: Set the time to 9:16 AM The command is as follows: # date -s 09:16:00
The setting time is August
Use the ps and grep commands to find the zombie process #ps -A -ostat,ppid,pid,cmd | Grep -e ^[Zz]
The role of a .linux device driver Kernel: used to manage hardware and software resources, and pro
In software development, tasks often have to go to sleep because some conditions are not met, and th
1. Restart the server2. At the beginning of the boot, enter the boot interface (as shown below) and
How to implement VM automatically with Xenserver host
How to avoid shell scripts being run multiple times at the same time
VMware View4.5 Virtual Desktop Solution FAQ
View the file and folder size under Linux. Use df and du command to introduce
10 shortcuts under Ubuntu Linux
Counting "unfinished" non-open source software on Linux platforms
Clearing the record of operation information under Linux system
Install RedHat Linux with Oracle VM VirtualBox
Linux (with CentOS as an example) Network configuration considerations
Vista system troubleshooting method
How to shut down the computer, I accidentally got rid of all the windows, what to do
Win8 system can not set a static IP address solution
Win10 system app store can not open how to solve
What should I do if the prompt is being "used by another program" when deleting a file?
A quick and easy way to add a print directory to a Windows 7 system
Can the Win10 system delete the cmak folder of the C drive?
Simple change of file association program
Tongfang's next generation of ultrabooks leaked the world's first Win8 ten-point touch