On Unix-like operating systems, the sleep command is used to delay for a specified amount of time.
This page covers the GNU/Linux version of sleep.
Description
The sleep command pauses for an amount of time defined by NUMBER.
- Description
- Syntax
- Examples
- Related commands
- Linux commands help
SUFFIX may be “s” for seconds (the default), “m” for minutes, “h” for hours, or “d” for days.
Some implementations require that NUMBER be an integer, but modern Linux implementations allow NUMBER to also be a floating-point value.
If more than one NUMBER is specified, sleep delays for the sum of their values.
Syntax
sleep NUMBER[SUFFIX]…
sleep OPTION
Options
Examples
sleep 10
Delays for 10 seconds.
Related commands
date — Output the current date and time.time — Report how long it takes for a command to execute.wait — Await process completion.