Sleep (Unix)
From Wikipedia, the free encyclopedia
- The correct title of this article is sleep (Unix). The initial letter is shown capitalized due to technical restrictions.
sleep is a Unix command line program that suspends program execution for a specified period of time.
The sleep instruction suspends the calling process for at least the specified number of seconds (the default), minutes, hours or days.
Contents |
[edit] 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.
[edit] Suffix
s (seconds) m (minutes) h (hours) d (days)
[edit] Options
--help display this help and exit --version output version information and exit
[edit] 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
Note that sleep 5h30m and sleep 5h 30m are illegal since sleep takes only one value and unit as argument. However, sleep 5.5h is allowed.
Possible uses for sleep include scheduling tasks and delaying execution to allow a process to start.
[edit] See also
[edit] External links
- Linux man page on usr-share-man.org : delay for a specified amount of time –
Unix command line programs and builtins (more) | |||
File and file system management: | cat | cd | chmod | chown | chgrp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
Text processing: | awk | comm | cut | ex | head | iconv | join | less | more | paste | sed | sort | tail | tr | uniq | wc | xargs | ||
Shell programming: | echo | expr | printf | unset | Printing: | lp |
Communications: inetd | netstat | ping | rlogin | traceroute |
Searching: find | grep | strings |
Miscellaneous: banner | bc | cal | man | size | yes |