Archive

Archive for the ‘Unix’ Category

UNIX: Copy multiple file with same syntax to a folder

January 27, 2012 Leave a comment

This command copies all the files that are present in the subfolders of the main folder FASTA into another folder called ONLY_FASTA. It is useful when i am trying to collect all fasta file into a folder based on their name.

$ find FASTA/ -name “*_M.fasta” -exec cp “{}” FASTA/ONLY_FASTA/ \;

Source:

http://www.linuxquestions.org/questions/linux-software-2/copy-files-from-different-directories-288678/

Categories: Unix Tags: