sleep
Delay for a specified amount of time
Overview
Pauses execution for an amount of time specified. The duration may be a floating-point number or an integer, followed by an optional unit suffix. If multiple NUMBER[SUFFIX] arguments are given, their sum is used.
Syntax
sleep NUMBER[SUFFIX]... [--help] [--version]Common Options
NUMBERA non-negative integer or floating-point number representing the duration.
s (default)Suffix for seconds.
mSuffix for minutes.
hSuffix for hours.
dSuffix for days.
--helpDisplay help text and exit.
--versionOutput version information and exit.
Examples
$ sleep 5
Pause for 5 seconds (default unit).
$ sleep 0.5
Pause for half a second.
$ sleep 3m
Pause for 3 minutes.
$ sleep 1h 30m 15s
Pause for 1 hour, 30 minutes, and 15 seconds (durations are summed).
$ echo "Task starting..."; sleep 10; echo "Task finished."
Used in a script to wait for 10 seconds between two actions.
Related Commands
sleepdelaypausewaitscripttimeduration