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
3 Ways to Check Linux Kernel Version in Command Line
Viewed 1149 times since Fri, Apr 19, 2019
SSH: Execute Remote Command or Script – Linux
Viewed 617 times since Mon, Feb 18, 2019
RHEL: Scan and configure new SAN (fibre channel) LUNs
Viewed 4738 times since Sun, May 27, 2018
RHEL: Change system’s hostname
Viewed 1327 times since Sun, May 27, 2018
haproxy linux
Viewed 124 times since Sun, Dec 6, 2020
Linux – delete the LUN and remove traces from OS
Viewed 1144 times since Tue, May 22, 2018
Lsyncd: live file syncronization across multiple Linux servers
Viewed 1965 times since Wed, Oct 31, 2018
Using IOzone for Linux disk performance analysis
Viewed 3819 times since Wed, Jul 25, 2018
Linux - How to perform I/O performance test with dd command
Viewed 756 times since Fri, Jun 8, 2018
Linux PAM configuration that allows or deny login via the sshd server
Viewed 623 times since Wed, Oct 3, 2018