Dtrx – 智能的存档文件(tar、zip、cpio、rpm、deb、rar)提取Linux工具

jopen 10年前

提取存档最令人困惑的莫过于面对不同的存档格式,不仅得选择合用的存档提取程序,有时还得搭配各种不同的选项。有了 dtrx 的帮助,则可以使我们变得更懒一点,只要记住一个命令就够了。

dtrx 这个 Python 程序能够提取 tar、zip、cpio、deb、rpm、gem、7z、cab、lzh、rar、gz、bz2、lzma、xz 等多种存档格式,甚至还包括递归提取功能。

要使用 dtrx 提取存档,只要在其后跟存档文件名称即可,如:

dtrx file_name.tar.gz

dtrx 的重要选项包括:

  • -l:列出存档中的文件
  • -r:递归提取存档文件
  • -m:提取元数据(如 deb)
  • -o:覆写模式
  • -f:将所有文件提取到当前目录

Dtrx 功能特性:

  1. Handles many archive types: It provides only one simple command to extract tar, zip, rar, gz, bz2, xz, rpm, deb, gem, self-extracting zip files and many other formats of exe files.
  2. Keeps everything organized: It will extract archives into their own dedicated directories.
  3. Sane permissions: It also make sure, user can read and write all those files after extraction, keeping permission intact.
  4. Recursive extraction: It can find archives inside the archive and extract those too.

项目主页:http://www.open-open.com/lib/view/home/1389149233187