{"id":24419,"date":"2017-12-05T06:30:40","date_gmt":"2017-12-05T12:30:40","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=24419"},"modified":"2022-06-03T03:35:21","modified_gmt":"2022-06-03T08:35:21","slug":"use-the-date-command-in-linux","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/use-the-date-command-in-linux\/","title":{"rendered":"Linux Date Command"},"content":{"rendered":"
<\/div>

\"How<\/p>\n

In this post, we will show you some examples on how to use the date command in Linux. The date command in Linux\u00a0 can be used to print or set the system date and time.\u00a0Using the Date Command in Linux its simple, just follow the examples and the syntax below. Let’s get started.<\/p>\n

<\/p>\n

By default when running the date command in Linux, without any arguments it will display the current system date and time:<\/p>\n

date<\/code><\/pre>\n
Sat  2 Dec 12:34:12 CST 2017<\/code><\/pre>\n

Syntax<\/h4>\n
Usage: date [OPTION]... [+FORMAT]\r\n  or:  date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]\r\nDisplay the current time in the given FORMAT, or set the system date.\r\n<\/code><\/pre>\n

Date examples<\/h3>\n

The following examples will show you how to use the date command to find the date and time from a period of time in the past or future.<\/p>\n

\n

Table of Contents<\/p>\n