????????? Linux Deepin ?????????????????? tarball ??????????????????????????????????????????????????????????????????

$ ls
backup1.tar backup2.tar backup3.tar

?????????????????????????????????????

?????????????????????? tar ???÷???tar ?????????????豸??д?????tar ???? Tape ARchiver ?????????????????????????????????????????????????? tar x myfineonthe.tape??????????? -f ????????? tar ????????????????????????????С??????????????????——??????????????????????????????????????????????????????????????????

tar -x -f backup.tar myfile.txt
# ???????????????????
tar xf backup.tar myfile.txt

??????????????????????????????????????????? backup1.tar backup2.tar backup3.tar ???????????????????????? tar xf *.tar????????????????н????

$ tar xf *.tar
tar: backup2.tar: Not found in archive
tar: backup3.tar: Not found in archive
tar: Exiting with failure status due to previous errors

??????????????£?Shell ????????????? *.tar ?滻??????????????????

tar xf backup1.tar backup2.tar backup3.tar

???????????????? tar ???÷??????п???????????????????????????“????????? backup1.tar ?н???? backup2.tar ?? backup3.tar”??????? backup1.tar ????????????????????????????????г????

????????????????????????н????????????ɡ????????????????? UNIX shell (Bash)?????????????????

for tarname in *.tar; do
tar xf "$tarname"
done

????????????????? for-????????????????????????????????????????????????????????????????????????????????????????????С?for-???????????????????????б??е??????????????????б????????????????

??????????for-???????? *.tar ????????????????????????? tar xf?????????????????????“?????”?????????

??????????????????????????? ZIP????? ZIP ??????????? unzip??????????????????unzip ???????????????? ZIP ?????????????????????????????

for zipfile in *.zip; do
unzip "$zipfile"
done

???????? unzip ?????????????????????????????? shell ???????pattern??????? ZIP ??????????? shell ??????Щ????????????????????unzip?????? shell???????????? *.zip??

unzip "*.zip"
# ???????????????????????????????????
unzip *.zip