只需一步即可以编程方式提取tar.gz(在具有7-Zip的Windows上) [英] Programmatically extract tar.gz in a single step (on Windows with 7-Zip)

查看:222
本文介绍了只需一步即可以编程方式提取tar.gz(在具有7-Zip的Windows上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:我希望能够一步提取tar.gz文件。这使我的问题几乎与这个问题相同: tar-gz的堆栈溢出问题

Problem: I would like to be able to extract tar.gz files in a single step. This makes my question almost identical to this one: Stack Overflow question for tar-gz.

我的问题是几乎,但不完全相同,因为我想在Windows上使用bat文件或Ruby / Perl / Python脚本中的7-Zip命令行(或类似方式)执行此操作。

My question is almost the same, but not the same, because I would like to do this on windows using 7-Zip command-line (or something similar) inside a bat file or Ruby/Perl/Python script.

问题:事实证明,这项看起来很简单的任务比首次出现时要涉及的更多。

Question: This seemingly simple task is proving to be more involved than the first appearance would make it out to be. Does anyone have a script that does this already?

推荐答案

7z e example.tar.gz  && 7z x example.tar

使用& 一步组合两个命令。使用7-Zip便携式文件(仅需要7z.exe和7z.dll)。

Use && to combine two commands in one step. Use the 7-Zip portable (you will need 7z.exe and 7z.dll only).

这篇关于只需一步即可以编程方式提取tar.gz(在具有7-Zip的Windows上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆