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
7 Tips – Tuning Command Line History in Bash
Viewed 5262 times since Fri, Jul 5, 2019
RHEL7: How to get started with Firewalld.
Viewed 11995 times since Wed, May 22, 2019
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 4477 times since Sun, May 20, 2018
LVM: Reduce root PV/VG
Viewed 5130 times since Sat, Jun 2, 2018
HP-UX - Stunnel Configuration
Viewed 2349 times since Fri, Sep 28, 2018
stunnel Howto A Guide to create SSL access to a HTTP-only webserver with stunnel
Viewed 2616 times since Fri, Sep 28, 2018
Installing and Configuring stunnel on CentOS 6
Viewed 4027 times since Fri, Sep 28, 2018
RHEL: Back-up/Replicate a partition table
Viewed 3324 times since Sun, May 27, 2018
20 Linux Command Tips and Tricks That Will Save You A Lot of Time linux
Viewed 4651 times since Thu, Apr 18, 2019
VMWare tools free
Viewed 8980 times since Mon, Jul 16, 2018