Linux sleep Command
What is Linux sleep Command?
In this tutorial we learn how to use sleep command in Linux. sleep command providing delay for a specified amount of time.
sleep NUMBER[SUFFIX]... sleep OPTION
Using sleep Command in Linux
The simplest way to use sleep command in linux is to provide number as parameter of the sleep command. For example.
The command above will create delay for 2 seconds.
Using sleep With Suffix
We can add suffix to the number that we provide to sleep command. The suffix options are: ‘s’ for seconds (the default), ‘m’ for minutes, ‘h’ for hours or ‘d’ for days.
So to create delay for 4 minutes for example, we can use the command below.
sleep Command Manual / Help
We can use
info command to see the manual page of sleep command.
sleep command also have
--help option to show list of options.
Man page of sleep command can be opened using the command below. To exit man or info page you can press
Info page of sleep command can be opened using the command below.
To open help page from sleep command we can run command below.
Linux sleep Command Source Code
You can find sleep command source code from the folowing repositories:
- [GitHub] sleep source code
- Coreutils’ sleep source code on GNU Savannah cgit
- sleep source code on GNU Savannah gitweb
Related Linux Commands
You can read tutorials of related Linux commands below:
In this tutorial we learn how to use sleep in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.