Issue
What I was curious about is whether I can use a version of the command
tar -xvf fileName.tar
to accomplish this.
Solution
I recommend to use this script.
#!/bin/bash
mkdir ./directory0
mkdir ./directory1
path="directory"
for catalog in ./"$path"*
do
tar -xvf fileName.tar -C $catalog
done
Answered By - Vadim Chernetsov Answer Checked By - Senaida (WPSolving Volunteer)