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
How to stop and disable auditd on RHEL 7
Viewed 41573 times since Tue, Aug 6, 2019
Linux File Systems (mkfs, mount, fstab) ext4
Viewed 3695 times since Sat, Jun 2, 2018
LVM: Extend an existing Volume Group by adding a new disk
Viewed 2549 times since Sat, Jun 2, 2018
Epoch & Unix Timestamp Conversion Tools
Viewed 70391 times since Fri, Jun 22, 2018
high swap space utilization in LINUX
Viewed 7103 times since Fri, Jul 13, 2018
Installing and Configuring stunnel on CentOS 6
Viewed 4607 times since Fri, Sep 28, 2018
linux-training.be gives you books for free to study Linux
Viewed 5417 times since Sat, Jun 2, 2018
Secure Secure Shell
Viewed 11905 times since Fri, Aug 21, 2020
20 Practical Examples of RPM Commands in Linux rpm
Viewed 8593 times since Mon, Feb 18, 2019
LUKS dm-crypt/Device encryption GUIDE
Viewed 2915 times since Fri, Jul 13, 2018