need to delete all lines from a group of files except the 1st 2 lines

Hello,

I have a group of text files with many lines in each file.

I need to delete all the lines in each and only leave 2 lines in each file.

What lines do you want to keep? The first, the last, lines containing word abc? In order to help you you need to give us more information...

Based on the Topic subject (except the 1st 2 lines)

head -n2 file1 file2 file3 file....

keep the first two lines only on each file.

find /PATH -type f -exec sed -i '3,$'d {} \;