You can use the timeout command that Runs a specified command with a time limit. If the command doesn't complete within the given time, timeout terminates it. For example, run a command named “ping www.cyberciti.biz” with a time limit of 30 seconds:
timeout 30s ping www.cyberciti.biz
See https://www.cyberciti.biz/faq/linux-run-a-command-with-a-time-limit/ for more information. #linux #opensource
Want to run a #Linux, #macos, #freebsd or #Unix command with a time limit? For example, run the ping command for 6 seconds only
timeout 6s ping {{hostname}}
See https://www.cyberciti.biz/faq/linux-run-a-command-with-a-time-limit/ for more info.
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.