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
Red Hat Enterprise Linux - Allow Root Login From a Specific IP Address Only
Viewed 3675 times since Wed, Oct 3, 2018
Index » Community Contributions » System encryption using LUKS and GPG encrypted keys for arch linux
Viewed 4770 times since Fri, Jul 13, 2018
10 Linux cryptsetup Examples for LUKS Key Management (How to Add, Remove, Change, Reset LUKS encryption Key)
Viewed 7040 times since Tue, Jul 31, 2018
IPTABLES linux
Viewed 17933 times since Sat, Jun 2, 2018
high swap space utilization in LINUX
Viewed 7405 times since Fri, Jul 13, 2018
RHEL: How to change a USER/GROUP UID/GID and all owned files
Viewed 27309 times since Sat, Jun 2, 2018
RHCS6: Quorum disk and heuristics
Viewed 5408 times since Sun, Jun 3, 2018
RHCS6: Mirror/unmirror a GFS2 volume
Viewed 6022 times since Sun, Jun 3, 2018
How To: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Viewed 8453 times since Fri, Jul 13, 2018
Learn Linux System Auditing with Auditd Tool on CentOS/RHEL
Viewed 6372 times since Fri, Apr 5, 2019