linux 如何批量解压rar到单独目录
PHP中文网
PHP中文网 2017-04-17 16:21:06
0
4
746

我现在想实现的是批量解压目录下的所有rar文件到与其文件名相同的目录下,请问怎么做呢?

rar -x *.rar 只能解压到当前目录

求解,谢谢

PHP中文网
PHP中文网

认证0级讲师

reply all(4)
伊谢尔伦

According to your needs, I wrote a script, the address is: https://segmentfault.com/a/11..., you can refer to it for suggestions

左手右手慢动作

Brother, please write a script

巴扎黑

I specially wrote a script to handle this kind of decompression: x.hs.

阿神

I wrote this out of thin air and have not tested it.

Not responsible for the consequences.

for f in *.rar;do mkdir ./$f && unrar $f ./$f;done
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template