Horje
bash timout Code Example
bash timout
# How to Use the timeout Command
timeout [OPTIONS] DURATION COMMAND [ARG]

# s - seconds (default)
# m - minutes
# h - hours
# d - days
# When no unit is used, it defaults to seconds. If the duration is set to zero, the associated timeout is disabled

#### Terminate a command after five seconds
timeout 5 ping 8.8.8.8

#### Terminate a command after one minute and six seconds
timeout 1.1m ping 8.8.8.8

## Sending Specific Signal
#### For example, to send SIGKILL to the ping command after one minute, you would use:
sudo timeout -s SIGKILL ping 8.8.8.8

## Killing Stuck Processes
#### In the following example, timeout runs the command for one minute, and if it is not terminated, it will kill it after ten seconds:
sudo timeout -k 10 1m ping 8.8.8.8

## Preserving the Exit Status
#### timeout returns 124 when the time limit is reached. Otherwise, it returns the exit status of the managed command
#### to return the exit status of the command even when the time limit is reached, use the --preserve-status option
timeout --preserve-status 5 ping 8.8.8.8
Source: linuxize.com




Shell

Related
git ssh key linux Code Example git ssh key linux Code Example
how to install webhint globally Code Example how to install webhint globally Code Example
where is the mpv config file linux Code Example where is the mpv config file linux Code Example
cordova plugin list save Code Example cordova plugin list save Code Example
partager le wifi de son pc ubuntu a son telephone Code Example partager le wifi de son pc ubuntu a son telephone Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14