我尝试从它们所在的目录中提取多个文件:
for i in $(find . -name '*.tgz'); do # search the tgz files and extract them tar -xvzf $i done
我预计该命令会将这些文件提取到它们所在的目录中,但是它们是在其目录之外提取的。如何确保 .tgz 文件被提取到它们所在的目录中?
bash find tar
bash ×1
find ×1
tar ×1