Linux Time modification does not restart modify time zone One, time to modify Linux Root uses the date directive: Date-s 1, only modified date, no modification time, input: Linux code 1. Date-s 2007-08-03 date-s 2007-08-03 2,
Note: When performing some performance tests, we sometimes want to calculateProgramSometimes, you may write a shell script to control the performance test (for example, you want to run n times to obtain the average value). In short, one of these
Description of Use
The Usleep command is used to delay the time in microseconds (sleep some number of microseconds), which actually does not reach this precision (Probably not accurate on many machines the mic Rosecond. Count on precision only
Linux Shell gets time and time interval (MS level)Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test
Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test control (such as the wish to run an average of n times,
1. set the system time date-s // set the current time. only the root permission can be set. others can only be viewed. Date-s20080523 // Set to 20080523, this will set the specific time to null 00: 00: 00date-s01: 01: 01 // set the specific time, do
Local Test Cases:
# there can be no spaces on either side of the equal sign, before the error has been out here
yesterday= ' date-d last-day +%y-%m-%d '
echo $yesterday
curday= ' Date +%y-%m-%d '
echo $curday
echo "Now time: ' Date ' +%y%m%d%T '"
In Linux shell programming, the addition and subtraction of dates is often usedView time:[[Email protected] ~]# DateFri SEP 2 13:12:56 CST 2016Modification Time:[[email protected] ~]# date-s "1980-01-01 00:00:00"Tue Jan 1 00:00:00 CST 1980Actually,
In linux, the date command is used to display and set the system date and time. On a linux server, you can use man date to view the usage of date. In the date setting time format command, each option has the following meanings:-d datestr, -- date
When compiling kernel, some warning messages are found as follows: Warning:clock skew detected. Your build is incomplete. The reason for this is that the current system's time is also before the last modification time of the files in the compiled
If the system time is set to the December 9, 1999 command as follows.
#date-S 12/09/99The command to set the system time to 2:18 P.M. 9 seconds is as follows.#date-S 14:18:09
Date
The command can not only display the current time of the system,
I read an article about Virtualization of Linux servers over the weekend. This paper tests the performance of several major open-source virtual products, just in line with the isolation performance of several different virtual technologies that I
In Linux shell programming, date addition and subtraction operations are often used
I used to calculate myself through the expr function, which is troublesome.
In fact, the date command itself provides the addition and subtraction of dates.
Very
1. Set the system time
Date-s // set the current time. Only the root permission can be set. Others can only be viewed.
Date-s 20080523 // set to 20080523, so that the specific time is set to null 00:00:00
Date-s 01:01:01 // set the specific
The date command can be used to display and modify the system datetime, noting that it is not a time command.1. Enter date at the command line to display the current time[[Email protected] logs]# DateSat Nov 00:00:02 CST 20142. Enter the date-s date
Date command Arguments
-d,–date=string Displays the time specified by STRING-f,–file=datefile A similar –date parameter to display the time per line in a Datefile file-itimespec,–iso-8601[=timespec] Displays the date/time in ISO 8601 format.
If the month is the current month minus the time you want to calculate, for example, to query all records in the database for the first three months from today, our statement is as follows: mktime (date (\ 'H \ '), date (\' I \ '), date (\'s \'),
The Linux date command is used in linux shell programming. Before the date addition and subtraction operations are often used, they are calculated by using the expr function. In fact, the date command itself provides the date addition and
In Linux Shell programming, addition and subtraction of dates are often used.
Previously, it was very troublesome to use expr function computing.
In fact, the date command itself provides the addition and subtraction operation of the date
Very
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.