是否可以通过一个命令将tar 文件的内容同时提取到两个目录?
Is it possible to extract the contents of a tar file to two directories at the same time with a single command?
我很好奇的是我是否可以使用命令的版本
tar -xvf fileName.tar
来完成这个。
我推荐使用这个脚本。
#!/bin/bash
mkdir ./directory0
mkdir ./directory1
path="directory"
for catalog in ./"$path"*
do
tar -xvf fileName.tar -C $catalog
done
我很好奇的是我是否可以使用命令的版本
tar -xvf fileName.tar
来完成这个。
我推荐使用这个脚本。
#!/bin/bash
mkdir ./directory0
mkdir ./directory1
path="directory"
for catalog in ./"$path"*
do
tar -xvf fileName.tar -C $catalog
done