Where to start First steps track · 15 stages
Linux Labs

sleep — delay execution

cheat sheet · Ubuntu 24.04; Bash 5.2 for shell builtins https://lab.dimsanych.ru/en/wiki/sleep/

Cheat sheet

  • sleep 1 pause for one second
  • sleep 0.5 fractional seconds in GNU sleep
  • sleep 2s explicit time unit
  • sleep 1m one minute
  • sleep --help installed version help

Options

The duration is an operand, not an option. GNU sleep accepts the suffixes s, m, h, and d; an unsuffixed number means seconds. Multiple intervals are added together. For a portable script, use one non-negative integer number of seconds.

Help and version options describe the program rather than start a timer. Check the available interface with sleep --help; do not assume that other implementations provide every GNU extension.

Loading…