Name

sleep — stdin  stdout  - file  -- opt  --help  --version

Synopsis

sleep time_specification

The sleep command simply waits a set amount of time. The given time specification can be an integer (meaning seconds) or an integer followed by the letter s (also seconds), m (minutes), h (hours), or d (days).

$ sleep 5m              Do nothing for 5 minutes

sleep is useful for delaying a command for a set amount of time:

$ sleep 10 && echo 'Ten seconds have passed.'
(10 seconds pass)
Ten seconds have passed.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.