Traverse through .tar.gz directories and concatenate files (without uncompressing the folders) Traverse through .tar.gz directories and concatenate files (without uncompressing the folders) shell shell

Traverse through .tar.gz directories and concatenate files (without uncompressing the folders)


Using bash find command as below; The cat command in exec is applied to all the files returned by the command. The + option is to ensure no more than one instance of the cat is spawned by the shell.

Here {} denotes the files returned the find command. Refer more about find -exec

find . -type f -name '*.abundance.tsv' -exec cat "{}" + >> ../AbundanceTSV.tsvfind . -type f -name '*.rsem.genes.norm_counts.tab' -exec cat "{}" + >> ../GenesNormCounts.tabfind . -type f -name '*.rsem_genes.hugo.results' -exec cat "{}" + >> ../HugoResults.results