首页 > 系统服务 > 详细

Linux批量解压缩脚本

时间:2018-11-19 18:41:55      阅读:212      评论:0      收藏:0      [点我收藏+]
 1 #!/bin/bash
 2 
 3 # 批量解压缩脚本
 4 # 作者: shaohsiung
 5 # 时间: 2018/11/19
 6 
 7 # Store all file names in the tmp directory with the suffix .tar.gz file in the temporary file ls.log
 8 cd /tmp
 9 ls *.tar.gz > ls.log
10 
11 for i in $(cat ls.log)
12     do
13         # Throw the output information at the time of decompression into the recycle bin
14         tar -zxf $i &> /dev/null
15     done
16 
17 # Delete temporary file ls.log
18 rm -rf /tmp/ls.log

 

ls.log文件的输出内容

技术分享图片

 

Linux批量解压缩脚本

原文:https://www.cnblogs.com/shaohsiung/p/9984531.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!