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
Linux Linux Network Statistics Tools / Commands
Viewed 8571 times since Mon, Sep 21, 2020
RHEL: Retrieve and generate a unique SCSI identifier
Viewed 2582 times since Sat, Jun 2, 2018
Linux 16 Useful Bandwidth Monitoring Tools to Analyze Network Usage in Linux
Viewed 11143 times since Mon, Sep 21, 2020
Fix rpmdb: Thread died in Berkeley DB library
Viewed 20427 times since Fri, Feb 14, 2020
ubuntu How to Reset Forgotten Root Password in Ubuntu
Viewed 2086 times since Tue, Dec 8, 2020
RHCS6: Reduce a Global Filesystem 2 (GFS2)
Viewed 2910 times since Sun, Jun 3, 2018
RHEL: GPT/MBR partition tables (using disks larger than 2 TiB)
Viewed 11738 times since Sun, May 27, 2018
“Too many authentication failures” with SSH
Viewed 4848 times since Mon, May 21, 2018
Fake A Hollywood Hacker Screen in Linux Terminal linux FUN
Viewed 4533 times since Thu, Apr 18, 2019
List DNS records, nameservers of a domain from command line
Viewed 1581 times since Sun, Sep 30, 2018