sleep — Suspend execution of a process for an interval of time

Format

sleep seconds

Description

sleep continues running until the specified number of seconds has elapsed. sleep can delay execution of a program or produce periodic execution in conjunction with shell commands.

The seconds argument can be either a number of seconds, or a more general time description of the form nhnmns, with the nh, nm, and the s being optional.

Examples

sleep 20h10m
sleeps for 20 hours and 10 minutes (or 72600 seconds).

Localization

sleep uses the following localization environment variables:
  • LANG
  • LC_ALL
  • LC_CTYPE
  • LC_MESSAGES
  • NLSPATH

See Localization for more information.

Exit values

0
Successful completion
2
Failure because you specified no seconds value or because seconds is an incorrect argument (for example, incorrect format).

Portability

POSIX.2, X/Open Portability Guide, UNIX systems.

Related information

date