[From] 54315390
Linux command--timeout
Introduction to Commands
Runs the specified command and kills the process if it is still running after a specified time. The time used to control the program run.
How to use
Timeout [option] number [suffix] command [parameter] ...
The suffix "s" stands for seconds (the default), "M" stands for minutes, "H" stands for hours, and "D" represents the day.
Detailed options
The long option must use parameters that are also required for short options. -S, the--signal= signal Specifies the signal sent at timeout. The signal can be a signal name like "HUP" or a signal number. View " kill-l " to get a list of signals -- help displays this assistance and exits -- version displays release information and exits if the program times out, the number of exits is 124, otherwise the program exits the status. If no signal is specified, the default is the term signal. The term signal kills the process when the process does not capture this signal. For other processes it may be necessary to use the Kill (9) signal, which of course cannot be captured.
Example
10 command
Explanation: If the command order ends in 10 seconds, the peace ends and runs for more than 10 seconds and will be forcibly killed.
[Go] linux command--timeout