Skip to content

fix: do not overwrite files while Cflag_count reaches Wflag #1333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ManzeonYip
Copy link

When the number of files reaches the specified value, avoid cyclic packet capturing from overwriting the already captured files.

@fxlb
Copy link
Member

fxlb commented Jun 26, 2025

The man page states:

       -W filecount
              Used in conjunction with the -C option, this will limit the num-
              ber  of  files  created to the specified number, and begin over-
              writing files from the beginning,  thus  creating  a  'rotating'
              buffer.  In addition, it will name the files with enough leading
              0s to support the maximum number of files, allowing them to sort
              correctly.

Have you noticed any anomalies about the usage?

@guyharris
Copy link
Member

I.e., this is the intended behavior of the flag -W n - to keep around only the past n files.

Are you seeing this behavior when the -C flag is specified but the -W flag is not specified?

@fxlb
Copy link
Member

fxlb commented Jul 21, 2025

@ManzeonYip Any answers to Guy's questions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants