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 Install and use Lsyncd on CentOS 7 / RHEL 7 rsync
Viewed 5920 times since Wed, Oct 31, 2018
LUKS dm-crypt/Device encryption GUIDE
Viewed 3370 times since Fri, Jul 13, 2018
FIO (Flexible I/O) – a benchmark tool for any operating system
Viewed 20775 times since Wed, Jul 25, 2018
Fałszujemy rozpoznania skanerów #2
Viewed 3797 times since Mon, May 21, 2018
Secure Remote Logging to Central Log Server Using RSYSLOG on CentOS 6 / CentOS 7 and stunnel
Viewed 5569 times since Sun, Dec 6, 2020
Inxi – A Powerful Feature-Rich Commandline System Information Tool for Linux
Viewed 19994 times since Sat, Jun 2, 2018
Modifying the inode count for an ext2/ext3/ext4 file system
Viewed 18436 times since Fri, Sep 18, 2020
Check a Website Availability from the Linux Command Line
Viewed 8072 times since Mon, Feb 18, 2019
Tcpdump Examples Linux
Viewed 7267 times since Fri, Nov 16, 2018
How to find the largest files and directories in Linux?
Viewed 4285 times since Sun, May 20, 2018