Reference

sleep(1)

suspend execution for an interval of time

NAME

sleep – suspend execution for an interval of time

SYNOPSIS

sleep seconds

DESCRIPTION

The sleep utility suspends execution for at least the given number of seconds. seconds must be a non-negative decimal value and may contain a fraction.

ASYNCHRONOUS EVENTS

SIGALRM

Terminate early, with a zero exit status.

EXIT STATUS

The sleep utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Wait five seconds before running a command:

$ sleep 5; echo Hello, World!

List a file twice per second:

while ls -l file; do
	sleep 0.5
done

SEE ALSO

at(1)

STANDARDS

The sleep utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

Support for fractional seconds is an extension to that specification.

HISTORY

A sleep utility first appeared in Version 4 AT&T UNIX.

This implementation of sleep first appeared in 4.3BSD-Tahoe.

History