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
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from
Viewed 1783 times since Wed, Oct 31, 2018
RHEL: How to change a USER/GROUP UID/GID and all owned files
Viewed 12542 times since Sat, Jun 2, 2018
Jak znaleźć najszybszy publiczny serwer DNS w Polsce?
Viewed 1518 times since Mon, May 21, 2018
Netcat shell zabezpieczony hasłem
Viewed 1239 times since Thu, May 24, 2018
RHEL: Forgotten ’root’ password / using single-user to gain access
Viewed 4698 times since Sat, Jun 2, 2018
Oracle Linux 7 – How to audit changes to a trusted file such as /etc/passwd or /etc/shadow
Viewed 1811 times since Wed, Jul 25, 2018
ZFS: Verify/change properties of a zfs filesystem
Viewed 1291 times since Sun, Jun 3, 2018
How To Ping Specific Port Number
Viewed 1526 times since Mon, Jun 1, 2020
Expand or grow a file system on a Linux VMWare VM without downtime
Viewed 10267 times since Fri, Jul 27, 2018
RHEL: Force system to prompt for password in Single User mode
Viewed 3578 times since Sat, Jun 2, 2018