Com zsh
( novamente ):
mergecap -w Merge.pcap /mnt/md0/capture/DCN/(D.om[-15,-1])
Ou com ferramentas GNU:
cd /mnt/md0/capture/DCN/ &&
find . -maxdepth 1 -name '*.pcap' ! -name Merge.pcap -type f -printf '%T@@%pmergecap -w Merge.pcap /mnt/md0/capture/DCN/(D.om[-15,-1])
' |
tr 'cd /mnt/md0/capture/DCN/ &&
find . -maxdepth 1 -name '*.pcap' ! -name Merge.pcap -type f -printf '%T@@%p%pre%' |
tr '%pre%\n' '\n%pre%' |
sort -n |
head -n 15 |
cut -d@ -f2- |
tr '%pre%\n' '\n%pre%' |
xargs -r0 mergecap -w Merge.pcap
\n' '\n%pre%' |
sort -n |
head -n 15 |
cut -d@ -f2- |
tr '%pre%\n' '\n%pre%' |
xargs -r0 mergecap -w Merge.pcap