3

I want to take a continuous dump file of particular size and after the dump reached it predefined size the new data should overwrite the file.

Help

2
  • So you want to dump to a file until it gets to say 20MB, and then, start dropping the oldest line from the file each time a new line is written?
    – slm
    Dec 16, 2013 at 7:15
  • yes @slm that's right
    – Özzesh
    Dec 16, 2013 at 8:29

1 Answer 1

3

I think your options, without the -G switch of tcpdump are limited to the method discussed in this U&L Q&A titled: Keep log file size fixed without logrotate.

The issue you're going to run into is, that with the alternative methods, a kill -HUP ... will need to be sent to tcpdump to signal it that the file's been moved/removed,

I'm not sure tcpdump is up to doing this, so I think your best option is to get a version of tcpdump on the box with this feature, IMO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.