svcadm(1M)을 검색하려면 섹션에서 1M 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
sleep(1)
sleep(1) User Commands sleep(1)
NAME
sleep - suspend execution for an interval
SYNOPSIS
/usr/bin/sleep interval[d|h|m|s]...
DESCRIPTION
sleep suspends execution for at least the time in seconds specified by
seconds or until a SIGALRM signal is received. The seconds operand can
be specified as a floating-point number but the actual granularity nor‐
mally depends on the underlying system.
OPERANDS
interval A floating-point number specifying the time for which to
suspend execution. The floating-point number may be speci‐
fied in all formats required by C99/XPG6, including con‐
stants such as Inf or infinite. One of four suffixes may
optionally be specified, indicating the number specified is
days (d), hours (h), minutes (m), or seconds (s). With no
suffix, the interval is assumed to be seconds. If multiple
intervals are specified they are summed together. Individ‐
ual intervals may be negative but the sum must be greater
than or equal to zero.
EXAMPLES
Example 1 Suspending Command Execution
The following example executes a command after a certain amount of
time:
example% (sleep 105; command)&
Example 2 Executing a Command Every So Often
The following example executes a command every so often:
example% while true
do
command
sleep 37
done
Example 3 Suspending Command Execution Forever
The following example suspends command execution forever or until a
SIGALRM signal is received:
example% sleep Inf
Example 4 Suspending Command Execution for 0.5 Seconds
Suspending command execution for 0.5 seconds using an alternative
floating-point representation for the value 0.5:
example% printf "%a\n" 0.5
0x1.0000000000000000000000000000p-01
example% sleep 0x1.0000000000000000000000000000p-01
Example 5 Suspending Execution for 23 Hours
The following example suspends execution for twenty three hours using a
letter suffixes:
example% sleep 1d -1h
ENVIRONMENT VARIABLES
See environ(7) for descriptions of the following environment variables
that affect the execution of sleep: LANG, LC_ALL, LC_CTYPE, LC_MES‐
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 The execution was successfully suspended for at least time sec‐
onds, or a SIGALRM signal was received (see NOTES).
>0 An error has occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ Interface StabilityCommit‐
ted _ StandardSee standards(7).
SEE ALSO
wait(1), alarm(2), sleep(3C), environ(7), attributes(7), standards(7)
NOTES
If the sleep utility receives a SIGALRM signal, one of the following
actions is taken:
o Terminate normally with a zero exit status.
o Effectively ignore the signal.
The sleep utility takes the standard action for all other signals.
Oracle Solaris 11.4 11 May 2021 sleep(1)