This question already has an answer here:
- tar files only, no directories 8 answers
Let's say I have two directories that I would to
tar without retaining the directory structure:
- Also, I would like to backup only files that begin with say f1 in /root/dir1 and a file called log.txt in /root/dir1
- In /root/dir2 I only want files that begin with f2
How I can achieve that?