The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

sleep - Pause a Program





The sleep command is used to pause a program, and it's commonly used in scripting languages. You can specify the duration in various time units such as "d" for days, "h" for hours, "m" for minutes, and "s" for seconds. The default unit is seconds.

The basic syntax is as follows:
sleep NUMBER[SUFFIX]... .



Example:
$ echo 'pls wait 3 sec.';sleep 3s;clear

In this example, it prints a message, pauses for three seconds, and then clears the screen.

For more usage examples, refer to the provided link.