---
title: "HP-UX  解压缩 命令"
author: "uuuvvv"
date: "2009-10-22T11:49:55Z"
tags: []
slug: "hp-ux"
draft: false
lastmod: "2009-10-22T11:49:55Z"
id: 500026
url: "https://uuuvvv.iteye.com/blog/500026"
---

测试环境使用了HP-UX yf4 B.11.31 U ia64 2914420519 unlimited-user license做服务器，但是在Unix上的命令不是太熟悉，在此做一个总结。
    解压缩操作是Unix系统常用的命令，当我们要部署程序时，通常会在本机上把部署程序打成zip包，到Unix上解压。这里要用到一个命令--gizp。
    
> usage: gzip [-cdfhllnnrtvv19] [-s suffix] [file ...]
>  -c --stdout      write on standard output, keep original files unchanged
>  -d --decompress  decompress
>  -f --force       force overwrite of output file and compress links
>  -h --help        give this help
>  -l --list        list compressed file contents
>  -L --license     display software license
>  -n --no-name     do not save or restore the original name and time stamp
>  -N --name        save or restore the original name and time stamp
>  -q --quiet       suppress all warnings
>  -r --recursive   operate recursively on directories
>  -S .suf  --suffix .suf     use suffix .suf on compressed files
>  -t --test        test compressed file integrity
>  -v --verbose     verbose mode
>  -V --version     display version number
>  -1 --fast        compress faster
>  -9 --best        compress better
>  file...          files to (de)compress. If none given, use standard input.
> 

    gzip * 表示把当前目录下的所有文件压缩
    gzip -d test.zip 表示吧test.zip解压到当前目录（加v参数可以解压的同事显示文件列表）
    gzip -l test.zip 表示显示test.zip中文件列表
    gzip test.tar 表示把之前的打包文件压缩为test.tar.gz