tar -cvzf a.tar.gz a --remove-files [root@nfs01 backup]# tar -zcvf 88.tar.gz --remove-files /backup/*tar: Removing leading `/' from member names/backup/10.txt/backup/1.txt/backup/2.txt/backup/3.txt/backup/4.txt/backup/5.txt/backup/6.txt/backup/…
我是用for i in $(ls *.tgz);do tar xvf $i;done 批量解压的tgz文件的我是用for i in $(ls *.gz);do gzip -d $i;done批量解压的gz文件的. 由于linux的tar命令不支持批量解压,所以很多网友编写了好多支持批量解压的shell命令,收集了一下,供大家分享:第一:for tar in *.tar.gz; do tar xvf $tar; donefor tar in *.tar.bz2; do tar xvf $tar;…