How to execute sleep command, command that takes time as a test [bash, linux, mac]

If you want to execute a command that takes a long time to test on the command line, you can use the sleep command.

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.

watch command

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
Reference site, link

[Linux] Issue commands in an infinite loop on the terminal

Recommended Posts

How to execute sleep command, command that takes time as a test [bash, linux, mac]
How to create a shortcut command for LINUX
How to execute a command using subprocess in Python
How to write a test for processing that uses BigQuery
How to copy and paste command line content without mouse in bash on Linux or mac
Verification of how to periodically execute a script on a Linux server on Windows
[Linux] How to use the echo command
How to use the Linux grep command
[Ubuntu] How to execute a shell script
How to test on a Django-authenticated page
How to access the contents of a Linux disk on a Mac (but read-only)
A memorandum of how to execute the! Sudo magic command in Jupyter Notebook
[Linux] [kernel module] How to pass parameters as arguments when loading a loadable kernel module
How to manage arguments when implementing a Python script as a command line tool
[Python] How to test command line parser click
How to disguise a ZIP file as a PNG file
How to write a ShellScript Bash for statement
Try to create a new command on linux
It's a Mac. What is the Linux command Linux?
How to write a ShellScript bash case statement
[Note] How to create a Mac development environment
How to execute a schedule by specifying the Python time zone and execution frequency
How to create a USB that Linux and Win10 installer and winpe can boot UEFI
How to use a tp-link wireless LAN slave unit that does not support Linux
How to unit test a function containing the current time using freezegun in python
A python script that wants to use Mac startup / end time for attendance management
How to test the current time with Go (I made a very thin library)
How to write a GUI using the maya command
Linux user addition, how to use the useradd command
How to display DataFrame as a table in Markdown
[Python] How to write a docstring that conforms to PEP8
How to create a local repository for Linux OS
How to build a development environment for TensorFlow (1.0.0) (Mac)
[Tips] How to use iPhone as webcam on Linux
How to build a Python environment on amazon linux 2
[Linux] How to put your IP in a variable
[Linux] How to monitor logs that are constantly added
How to start the PC at a fixed time every morning and execute the python program
How to display a specified line of a file or command result on Linux (sed, awk)