Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

sleep

v0.13.0
sleep NUMBER[SUFFIX]...
sleep OPTION

Pause for NUMBER seconds.

Options

pause for NUMBER seconds

Pause for NUMBER seconds. SUFFIX may be ‘s’ for seconds (the default), ‘m’ for minutes, ‘h’ for hours or ‘d’ for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number. Given two or more arguments, pause for the amount of time specified by the sum of their values.

Examples

Delay in seconds:

sleep {{seconds}}

Delay in [m]inutes. (Other units [d]ay, [h]our, [s]econd, [inf]inity can also be used):

sleep {{minutes}}m

Delay for 1 [d]ay 3 [h]ours:

sleep 1d 3h

Execute a specific command after 20 [m]inutes delay:

sleep 20m && {{command}}

Delay forever:

sleep {{[inf|infinity]}}

Delay for one millisecond:

sleep {{0.001|1e-3}}

Display help:

sleep --help

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.