I have the following structure:
.
├── dag_1
│ ├── dag
│ │ ├── current
│ │ └── deprecated
│ └── sparkjobs
│ ├── current
│ | └── spark_3.py
│ └── deprecated
│ └── spark_1.py
│ └── spark_2.py
├── dag_2
│ ├── dag
│ │ ├── current
│ │ └── deprecated
│ └── sparkjobs
│ ├── current
│ | └── spark_3.py
│ └── deprecated
│ └── spark_1.py
│ └── spark_2.py
I want to create a new folder getting only current spark jobs, my expected output folder is:
.
├── dag_1
| └── spark_3.py
├── dag_2
└── spark_3.py
I've tried to use
find /mnt/c/Users/User/Test/ -type f -wholename "sparkjob/current" | xargs -i cp {} /mnt/c/Users/User/Test/output/
Although my script is not writing the files and returns me no error. How can I solve this?