Bash copy multiple files from subdirectories

This command searches the directories in the current directory and copies the text files into the TEXT directory.

for i in ./* ; do cp "${i}"/*.txt ./TEXT ; done

Leave a Reply

Your email address will not be published. Required fields are marked *