If you want to execute a command that takes a long time to test on the command line, you can use the sleep command.
The sleep command will be in a stopped state for the specified time. The command below will stop for 10 seconds.
$ sleep 10
You can also use the watch, top commands, etc. if you just want to execute commands that run for a long time.
The watch command periodically executes the command specified in the argument repeatedly.
$ watch date
By the way, the watch command is not included in mac by default, so you need to install it.
$ brew install watch
[Linux] Issue commands in an infinite loop on the terminal
Recommended Posts