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
RHEL: Building a custom kernel on RHEL 6
Viewed 4922 times since Sat, Jun 2, 2018
RHEL: iSCSI target/initiator configuration on RHEL7
Viewed 12187 times since Sat, Jun 2, 2018
LVM: Recovering Physical Volume Metadata
Viewed 13846 times since Sat, Jun 2, 2018
Linux LVM recovery
Viewed 18674 times since Wed, Jan 23, 2019
How to use yum-cron to automatically update RHEL/CentOS Linux
Viewed 3343 times since Wed, Oct 17, 2018
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from
Viewed 6061 times since Wed, Oct 31, 2018
How To: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Viewed 8013 times since Fri, Jul 13, 2018
Index » Community Contributions » System encryption using LUKS and GPG encrypted keys for arch linux
Viewed 4174 times since Fri, Jul 13, 2018
LVM: Mount LVM Partition(s) in Rescue Mode
Viewed 5889 times since Sat, Jun 2, 2018
8 Vim Tips And Tricks That Will Make You A Pro User
Viewed 3704 times since Fri, Apr 19, 2019