Home > Blockchain >  find certain files and copy their content into new file in bash
find certain files and copy their content into new file in bash

Time:08-19

I want to find all the files with the same name (File.txt) in my current directory (./parent) and subdirectories (./parent/subdirectory{1..100}) and copy their content to a new file (line by line) in the parent directory. any ideas?

CodePudding user response:

Would this work for you ?

find . -name File.txt -exec cat {}   > full.txt 
  • Related