Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the sleep command of linux to delay the execution of the current command

Shulou Source: shulou.com Published: 2022-06-02 18:07:00 09月17日 Update

This article mainly introduces the use of linux sleep command to delay the execution of the current command, the article is very detailed, has a certain reference value, interested friends must read it!

The sleep command can be used to delay the current action for a period of time until the time specified by the parameter is reached or interrupted by the signal. Permissions: all users.

Syntax format: sleep [parameters]

Common parameters:

-- help displays auxiliary messages-- version displays version number number time length, followed by s, m, h or dsmhds for seconds, m for minutes, h for hours, and d for days

Reference example

Dormant for 5 minutes:

[root@linuxcool ~] # sleep 5m

Delay 1 minute after displaying the current time, display the time again:

[root@linuxcool ~] # date; sleep 1m; date is all about delaying the execution of the current command using linux's sleep command. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Commands time delays parameters content references values users signals interests again actions instances guys buddies hours frequently used days more permissions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn OPPO Reno Shulou Technology Huawei