S
S
Sergey Vasiliev2021-07-18 13:17:38
bash
Sergey Vasiliev, 2021-07-18 13:17:38

How to recursively compress certain files into tar?

There is a command like this:
tar -cf back.tar /home/*/*(*.json|*.yml)
It only works on the /home/*/ directory
How can I make it work on all /home/*/*/*/*/.... directories?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2021-07-18
@saboteur_kiev

Your team must do everything.
But you need to clarify the nesting level of directories - it must match the mask

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question