Gnu – Timeout

This is one of those extremely useful commands that not many people know. Basically runs a shell command and exits when the time runs out. The format is as follows:

timeout [OPTION] DURATION COMMAND [ARG]…

Lets see an example:

  • timeout 10s top : This starts the top utility waits for 10 seconds and quit. Simple. The sufixes are:
    • s for second
    • m for minutes
    • h for hours
    • d for days

As always, check the man page for more details and info.


Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *