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
stunnel bacula
Viewed 2762 times since Fri, Sep 28, 2018
YUM CRON RHEL7: Configure automatic updates.
Viewed 2526 times since Fri, Oct 26, 2018
LVM: Reduce an existing Volume Group by removing one of its disks
Viewed 3044 times since Sat, Jun 2, 2018
Lsyncd: live file syncronization across multiple Linux servers
Viewed 7904 times since Wed, Oct 31, 2018
How to use yum-cron to automatically update RHEL/CentOS Linux 6.x / 7.x
Viewed 5821 times since Tue, Dec 4, 2018
Przekazywanie portów TCP rinetd
Viewed 46357 times since Thu, May 24, 2018
Index » Community Contributions » System encryption using LUKS and GPG encrypted keys for arch linux
Viewed 4313 times since Fri, Jul 13, 2018
How do I add ethtool settings to a network device permanently?
Viewed 7533 times since Mon, May 21, 2018
LVM: Mount LVM Partition(s) in Rescue Mode
Viewed 5968 times since Sat, Jun 2, 2018
Deskshare TLS over Stunnel
Viewed 3386 times since Fri, Sep 28, 2018