不解压查看tar.gz包内文件

通过tar命令备份、解压缩文件,也可在不解压缩文件时查看包内的文件信息。

使用如下参数:

1 tar -ztvf file.tar.gz

将列出所有包内的文件列表,包括目录

-z, --gzip, --gunzip, --ungzip filter the archive through gzip
-t, --list list the contents of an archive
-v, --verbose verbosely list files processed
-f, --file=ARCHIVE  use archive file or device ARCHIVE
原文地址:https://www.cnblogs.com/0820LL/p/9620158.html