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


tcpdump -n -i eth0 -w & pid=$! ; (sleep 3600 ; kill $pid)
0 (0)
Article Rating (No Votes)
Rate this article
There are no attachments for this article.
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
How to schedule crontab in Unix Operating Systems
Viewed 943 times since Fri, Jun 8, 2018
Viewed 10238 times since Fri, Nov 30, 2018
RHEL: Remove existing SAN LUNs
Viewed 12351 times since Sat, Jun 2, 2018
Testing TLS/SSL encryption
Viewed 11186 times since Thu, Jan 16, 2020
20 Linux YUM (Yellowdog Updater, Modified) Commands for Package Management YUM
Viewed 9811 times since Thu, Oct 25, 2018
Setup SSL Tunnel Using Stunnel on Ubuntu
Viewed 844 times since Fri, Sep 28, 2018
RHEL: Displaying/setting kernel parameters - ’sysctl’
Viewed 1533 times since Sat, Jun 2, 2018
12 Linux Rsync Options in Linux Explained
Viewed 9687 times since Wed, Oct 31, 2018
Fałszujemy rozpoznania skanerów #2
Viewed 1619 times since Mon, May 21, 2018
RHEL: Bonding network interfaces
Viewed 1861 times since Sat, Jun 2, 2018