Sleep (Unix)
2896736
211095695
2008-05-08T19:39:46Z
Ghettoblaster
6603820
{{lowercase}}
'''sleep''' is a [[Unix]] [[command line]] program that [[sleep (operating system)|suspends]] program execution for a specified period of time.
The sleep instruction suspends the calling [[process (computing)|process]] for at least the specified number of seconds (the default), minutes, hours or days.
==Usage==
sleep '''number'''[suffix]...
or:
sleep option
Where '''number''' is a required [[floating point]] number, and suffix is an optional suffix to indicate the time period.
===Suffix===
'''s''' (seconds)
'''m''' (minutes)
'''h''' (hours)
'''d''' (days)
===Options===
'''--help''' display this help and exit
'''--version''' output version information and exit
==Examples==
sleep 5
Causes the current terminal session to wait 5 seconds. The default unit is seconds.
sleep 5h
Causes the current terminal session to wait 5 hours
sleep 3h ; mplayer foo.mp3
Wait 3 hours then play foo.mp3
Note that '''<tt>sleep 5h30m</tt>''' and '''<tt>sleep 5h 30m</tt>''' are illegal since sleep takes only one value and unit as argument. However, '''<tt>sleep 5.5h</tt>''' is allowed.
Possible uses for <tt>sleep</tt> include scheduling tasks and delaying execution to allow a process to start.
==See also==
*[[Sleep (operating system)]]
==External links==
*{{man|1|sleep|Linux|delay for a specified amount of time}}
{{unix commands}}
[[Category:Unix software]]
[[pl:Sleep]]
[[ru:Sleep]]