<div><br></div>I want to backup a directory using tar, but want separate tarballs for each subdirectory. For example: <div># ls dir1<br><div>subdir1 subdir2 subdir3</div></div><div><br></div><div>Will it possible to do it using only tar command? Or will I need another separate piece of logic/control? I thought of writing a shell script with three tar commands for each subdirectory, but that's not elegant way of doing it. Also, it may not scale as number of subdirectories change. Any other solutions or tips for doing this will be really helpful. </div>
<div><br></div><div>Thank you</div><div>jM</div>