linux tar 命令实例

打包一个目录或文件
tar -cvf filename.tar directory/file

列出tar文件的内容
tar -tvf filename.tar

抽取tar文件的内容
tar -xvf filename.tar

使用bzip来压缩文件
tar -cjvf filename.tbz file

解压bzip文件
tar -xjvf filename.tbz

使用gzip来压缩文件
tar -czvf filename.tgz file

解压gzip文件
tar -xzvf filename.tgz

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>