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 secondm
for minutesh
for hoursd
for days
As always, check the man page for more details and info.
Deja una respuesta