My directory structure is given below. I need to move all the folders from Test3 to Test2 and concatenate the files with same names
[jg@hpc Test2]$ tree
.
|-- Sample_1008
| |-- 1008_ATCACG_L002_R1_001.fastq
| |-- 1008_ATCACG_L002_R2_001.fastq
| |-- 1008_ATCACG_L006_R1_001.fastq
| `-- 1008_ATCACG_L006_R2_001.fastq
`-- Sample_1009
|-- 1009_CGATGT_L002_R1_001.fastq
|-- 1009_CGATGT_L002_R2_001.fastq
|-- 1009_CGATGT_L006_R1_001.fastq
`-- 1009_CGATGT_L006_R2_001.fastq
[jg@hpc Test3]$ tree
.
|-- Sample_1008
| |-- 1008_ATCACG_L002_R1_001.fastq
| |-- 1008_ATCACG_L002_R2_001.fastq
| |-- 1008_ATCACG_L006_R1_001.fastq
| `-- 1008_ATCACG_L006_R2_001.fastq
`-- Sample_1009
|-- 1009_CGATGT_L002_R1_001.fastq
|-- 1009_CGATGT_L002_R2_001.fastq
|-- 1009_CGATGT_L006_R1_001.fastq
`-- 1009_CGATGT_L006_R2_001.fastq
I tried
mv Test3/* /auto/dr-lc_sa1/Data/Test2
nothing worked but when I tried
cp -r Test3/* Test2/
It overwrites.
I want the files to be concatenated. At the end I need to have one Test2 directory and under every sample and their fastq files in the Test3 directory will be concatenated to corresponding fastq files in Test2 directory.