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
Linux 20 Netstat Commands for Linux Network Management
Viewed 9781 times since Mon, Sep 21, 2020
List of 10 Must Know Oracle Database Parameters for Database Administrator
Viewed 130187 times since Thu, Jun 21, 2018
10 nmap Commands Every Sysadmin Should Know
Viewed 10103 times since Wed, May 22, 2019
RHEL: Extending a multipath LUN
Viewed 5238 times since Sun, May 27, 2018
How to deal with dmesg timestamps
Viewed 3721 times since Wed, Oct 3, 2018
linux-training.be gives you books for free to study Linux
Viewed 5077 times since Sat, Jun 2, 2018
Linux – delete the LUN and remove traces from OS
Viewed 3791 times since Tue, May 22, 2018
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 5921 times since Sun, Jan 9, 2022
7 Tips – Tuning Command Line History in Bash
Viewed 5603 times since Fri, Jul 5, 2019
stunnel How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
Viewed 1890 times since Sun, Dec 6, 2020