How to use the date command under LINUX __linux

Source: Internet
Author: User
How to use the date command under Linux
in Linux, the date command is a very common command that we often need to use to view system time, set system time, and so on.
1. Set the system time directly using the date command such as: Set the system time is October 1, 2015 12:30 18 seconds # date 100112302015.18 or # date-s "2015-10-01 12:30:18"
2. Date commands that are commonly used in scripts Show Current year date +%y Displays the current month date +%m shows which day the date +%d Displays the current month and day format date +%y%m%d date +%y/%m%d ....
3, date-d parameter in scripting, date-d is very useful if the day before is displayed date-d ' 1 days ago ' or date-d yesterday +%y%m%d Tomorrow's date date-d next-day +%y%m%d Next Monday time date-d ' next Monday '

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.