lbzip2 解压缩 tar 文件
lbzip2 uncompress tar file
我压缩了一个有很多子文件夹的文件夹(大约 50GB)
压缩:
tar -cjf test.tar.bz2 test
解压:
lbzip2 -k -d -n 5 test.tar.bz2 ~/temp/
为什么输出是 .tar 文件?
我正在搜索 google 但我很困惑
我希望有一个未压缩的文件夹
谢谢
这些可能有帮助:
# 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
}
tar -xjf test.tar.bz2
这将 运行 bunzip2
解压缩,它将提取 tar 文件的内容。
如果觉得需要专门用lbzip2
解压,那么:
lbzip2 -dc < test.tar.bz2 | tar xf -
我压缩了一个有很多子文件夹的文件夹(大约 50GB)
压缩:
tar -cjf test.tar.bz2 test
解压:
lbzip2 -k -d -n 5 test.tar.bz2 ~/temp/
为什么输出是 .tar 文件? 我正在搜索 google 但我很困惑 我希望有一个未压缩的文件夹
谢谢
这些可能有帮助:
# 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
}
tar -xjf test.tar.bz2
这将 运行 bunzip2
解压缩,它将提取 tar 文件的内容。
如果觉得需要专门用lbzip2
解压,那么:
lbzip2 -dc < test.tar.bz2 | tar xf -