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
RHEL: Route network packets to go out via the same interface they came in
Viewed 1201 times since Sat, Jun 2, 2018
stunnel Howto A Guide to create SSL access to a HTTP-only webserver with stunnel
Viewed 523 times since Fri, Sep 28, 2018
RHEL: iSCSI target/initiator configuration on RHEL7
Viewed 1471 times since Sat, Jun 2, 2018
LVM: Extend an existing Volume Group by adding a new disk
Viewed 705 times since Sat, Jun 2, 2018
Linux File Systems (mkfs, mount, fstab) ext4
Viewed 923 times since Sat, Jun 2, 2018
Exclude multiple files and directories with rsync
Viewed 550 times since Wed, Oct 31, 2018
LUKS List available methods of encryption for LUKS
Viewed 575 times since Fri, Jul 13, 2018
OpenSSL: Check SSL Certificate Expiration Date and More
Viewed 754 times since Mon, Feb 18, 2019
Script to Offline and Remove A Disk In Linux
Viewed 470 times since Mon, Jan 28, 2019
RHEL: XFS basic operations
Viewed 1404 times since Sat, Jun 2, 2018