OpenBSD manual page server

Manual Page Search Parameters

SLEEP(1) General Commands Manual SLEEP(1)

sleepsuspend execution for an interval of time

sleep seconds

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.

Terminate early, with a zero exit status.

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

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

at(1)

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.

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

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

July 30, 2022 OpenBSD-current