How to use the sleep command on Linux

  
                

sleep, meaning sleep, in the Linux system, the sleep command is mainly used to delay the time of the shell script, but also can be used in the Windows system, the following small series for the sleep command in the Linux system to give a detailed introduction And for everyone to distinguish between the Linux sleep and Windows sleep commands.

The linux sleep command is used to sleep for a while, and sleep can be used to delay the current action for a while. The units of time are: seconds (s), minutes (m), hours (h), days (d)

usage is as follows:

sleep Number(suffix)

the default units are in seconds (s)

sleep 1 == sleep 1s

sleep 0.01

View version

linux sleep and The difference between windows sleep

In linux, the unit of sleep is seconds, that is, sleep 1000 is 1000 seconds of sleep, and in windows, if the sleep function unit is milliseconds, sleep(1000) is sleep. For 1 second.

The above is the introduction of Linux using the sleep command. As you can see from the introduction of this article, the difference between sleep in Linux and Windows system is mainly in the unit, but the usage is not much different.

Copyright © Windows knowledge All Rights Reserved