I have the following folder structure
A
|-B
| |-C
| |-1.log
| |-2.log
|-10.log
|-D
|-E
|-F
|-php.log
|-H
|-php.log
I want to collect all the log files and the php file present in the H subdirectory and make into a tar.
I tried tar -czf temp.tar.gz /A/**/*.log /A/D/F/H/php.log
but it doesn't seem to search recursively in the A
directory.
I am using Amazon Linux
tar -czf temp.tar.gz /A/*/*/*.log /A/D/F/H/php.log
/
character before theA
right? Maybe you should try justA/
...