Odpalenie polecenia tylko na jedną godzinę

Użycie polecenia timeout do uruchomienia wybranego polecenia na określony czas działania:

timeout 1h tcpdump -n -i eth0 -w network.pcap not host 192.168.1.5

lub

tcpdump -n -i eth0 -w & pid=$! ; (sleep 3600 ; kill $pid)
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 102603 times since Thu, Jun 21, 2018
RHEL: ACLs basics
Viewed 6498 times since Sun, May 27, 2018
8 Vim Tips And Tricks That Will Make You A Pro User
Viewed 3155 times since Fri, Apr 19, 2019
Top 20 OpenSSH Server Best Security Practices - good article
Viewed 10897 times since Mon, Oct 1, 2018
stunnel basics and pki standards
Viewed 9671 times since Fri, Sep 28, 2018
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 6473 times since Sat, Jun 2, 2018
OpenSSL: Check If Private Key Matches SSL Certificate & CSR
Viewed 3400 times since Mon, Feb 18, 2019
Linux How to reset a root password on Fedora
Viewed 2797 times since Sun, Dec 6, 2020
What Is /dev/shm And Its Practical Usage
Viewed 8333 times since Tue, Mar 12, 2019
Linux Cluster Tutorial
Viewed 2312 times since Sat, Sep 29, 2018