What I was curious about is whether I can use a version of the command
tar -xvf fileName.tar
to accomplish this.
Advertisement
Answer
I recommend to use this script.
JavaScript
x
#!/bin/bash
mkdir ./directory0
mkdir ./directory1
path="directory"
for catalog in ./"$path"*
do
tar -xvf fileName.tar -C $catalog
done