Score:0

"tcpdump" command in "crontab" crashes immediately after running the "crontab" jobs

cf flag

I want crontab to start a tcpdump command, but tcpdump seems to crash immediately after running the crontab jobs. This is the command that I am trying to run:

@reboot  /usr/sbin/tcpdump -l enpls0 -G 3600 -tttt -vvv 'port 5000' -w /home/edward/dump-%H.pcap

What am I doing wrong?

Ringer23 avatar
gs flag
https://stackoverflow.com/questions/74319531/why-is-crontab-not-starting-my-tcpdump-bash-script-capture Check out the link. Hopefully, some of those suggestions will help. Try to update the script.
hr flag
It may not be the *only* issue, but you will need to escape the `%` in the filename in order for the `%H` to be processed as a timespec for the `-G 3600` file rotation option. See for example [Command with percent symbols not running in crontab](https://askubuntu.com/questions/433866/command-with-percent-symbols-not-running-in-crontab).
karel avatar
sa flag
Does this answer your question? [Command with percent symbols not running in crontab](https://askubuntu.com/questions/433866/command-with-percent-symbols-not-running-in-crontab)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.