Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
    
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 '13 at 7:15
    
yes @slm that's right –  Özzesh Dec 16 '13 at 8:29

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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