How to schedule tcpdump to run for a specific period of time?

前端 未结 5 1029
我寻月下人不归
我寻月下人不归 2021-01-30 16:28

Each time, when I manually run tcpdump, I have to use Ctrl+C to stop it. Now I want to schedule my tcpdump with cronjob and I onl

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 17:25

    you could use timeout

    timeout 5400 tcpdump -i eth0 'port 8080' -w myfile
    

提交回复
热议问题