lbzip2取消压缩焦油文件

发布于 2025-01-25 11:33:31 字数 237 浏览 3 评论 0原文

我压缩了一个带有许多子文件夹(约50GB)

压缩的文件夹:

tar -cjf test.tar.bz2 test

unzip:

lbzip2 -k -d -n 5 test.tar.bz2 ~/temp/

为什么输出为.tar文件? 我正在搜索Google,但我很困惑 我希望一个未压缩的文件夹

谢谢你

I compressed a folder with many subfolders ( about 50GB)

Compression:

tar -cjf test.tar.bz2 test

unzip:

lbzip2 -k -d -n 5 test.tar.bz2 ~/temp/

Why the output is a .tar file ?
I'm searching on google but I'm confused
I expect a uncompressed folder

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千と千尋 2025-02-01 11:33:31

tar -xjf test.tar.bz2

将运行bunzip2进行解压缩,并将提取焦油文件的内容。

如果您觉得需要专门使用lbzip2进行解压缩,则:

lbzip2 -dc< test.tar.bz2 | tar XF -

tar -xjf test.tar.bz2

That will run bunzip2 to decompress and it will extract the contents of the tar file.

If you feel the need to specifically use lbzip2 for decompression, then:

lbzip2 -dc < test.tar.bz2 | tar xf -

絕版丫頭 2025-02-01 11:33:31

这些可能会有所帮助:

# Compress a folder with many subfolders and files.
function compress() {
    # Get the name of the folder to compress.
    echo "Enter the name of the folder to compress:"
    read folder
    # Get the name of the compressed file.
    echo "Enter the name of the compressed file:"
    read file
    # Compress the folder.
    tar -czf $file $folder
}

# Decompress a tar file into a folder using lbzip2.
function decompress() {
    # Get the name of the file to decompress.
    echo "Enter the name of the file to decompress:"
    read file
    # Get the name of the folder to decompress into.
    echo "Enter the name of the folder to decompress into:"
    read folder
    # Decompress the file.
    lbzip2 -d $file
    # Extract the file.
    tar -xzf $file -C $folder
}

These might help:

# Compress a folder with many subfolders and files.
function compress() {
    # Get the name of the folder to compress.
    echo "Enter the name of the folder to compress:"
    read folder
    # Get the name of the compressed file.
    echo "Enter the name of the compressed file:"
    read file
    # Compress the folder.
    tar -czf $file $folder
}

# Decompress a tar file into a folder using lbzip2.
function decompress() {
    # Get the name of the file to decompress.
    echo "Enter the name of the file to decompress:"
    read file
    # Get the name of the folder to decompress into.
    echo "Enter the name of the folder to decompress into:"
    read folder
    # Decompress the file.
    lbzip2 -d $file
    # Extract the file.
    tar -xzf $file -C $folder
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文