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

前端 未结 5 956
我寻月下人不归
我寻月下人不归 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:09

    You can use

    watch tcpdump -i eth0 'port 8080' -w  myfile
    

    This will run every 2 seconds.

提交回复
热议问题