Get the App
SLTechnology News&Howtos  ›  Servers  › 

Example Analysis of linux Modification time

Shulou Source: shulou.com Published: 2022-05-31 11:21:38 09月21日 Update

Today, I will talk to you about the example analysis of linux modification time, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

In linux, you can use the date command to modify the time. The function of this command is to display or set the date and time of the system. You can set the time according to the specified format. The syntax is "time after date-s modification".

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to modify the time of linux

The Linux date command can be used to display or set the date and time of the system. In terms of display, users can set the format they want to display. The format is set to a plus sign followed by several tags. The list of available tags is as follows:

The syntax is:

Date [- u] [- d datestr] [- s datestr] [--utc] [--universal] [--date=datestr] [--set=datestr] [--help] [--version] [+ FORMAT] [MMDDhhmm [[CC] YY] [.ss]]

Parameter description:

-d datestr: displays the time set in datestr (non-system time)

-- help: displays auxiliary messages

-s datestr: sets the system time to the time set in datestr

-u: displays the current Greenwich mean time

-- version: displays the version number

Examples are as follows:

Date-s 11-12-19

Modify the current date of the system to November 12, 19. Note that this command will set your time to 00:00:00.

Date-s 23:43:20

Set your time to 23:43:20

After reading the above, do you have any further understanding of the sample analysis of linux modification time? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Time system commands examples content date format analysis tags syntax action user plus sign parameters that is tutorials aspects time more version Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Docker Shulou Technology Shulou Information Shulou Tech Info