I
I
Ivan2015-11-11 19:40:29
ubuntu
Ivan, 2015-11-11 19:40:29

How to run tcpdump by cron?

Hello. There is a need to run tcpdump. How can this be done via cron?
Because doing it by hand is not an option. What is in the Internet on this topic is not suitable.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nadz Goldman, 2015-11-11
@bordakovskiy

Didn't understand.
Give an example of what is not working for you.
It should work like this (for example):

52      3       *       *       *       root    /usr/sbin/tcpdump -i ethX src 189.9.34.2 > /home/username/tcpdump.out

I
Ivan, 2015-11-11
@bordakovskiy

Nadz Goldman Thanks, I just didn't specify /usr/sbin/ Everything works.

A
Andrew, 2015-11-13
@drevil

Maybe it's better to use at?
(at least for a one-time run)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question