tcpreplay how to add all pcap files under one directory to let the tcpreplay pcap files

666 Views Asked by At

the latest tcpreplay still only support to replay a file(files).

for example the command is tcpreplay -i eth0 sample.pcap sample1.pcap

I have over 100 pcaps that need to replay. they r all under folder is there a way to let tcpreplay plays all files under one directory ( including files from all sub-directories)

1

There are 1 best solutions below

0
On

You can use regex:

In case there are other files:

tcpreplay -i eth0 *pcap

Or in case only pcaps are there:

tcpreplay -i eth0 *