zoukankan      html  css  js  c++  java
  • linux命令,压缩打包(gzip,zcat,bzip2,bzcat,tar)

    1. 压缩命令:gzip,zcat,bzip2,bzcat

      gzip -v manpath.config  ->  将manpath.config压缩成manpath.config.gz格式,并删除manpath.config,v表示显示压缩比等信息

      gzip -d manpath.config.gz  ->  将manpath.config.gz解压缩成manpath.config格式,并删除manpath.config.gz,d表示解压缩参数

      gzip -c manpath.config > manpath.config.gz  ->  将manpath.config压缩成manpath.config.gz格式,并保留manpath.config

      zcat manpath.config.gz  ->  读取压缩文件manpath.config.gz 的内容

      bzip2 -z manpath.config  ->  将manpath.config压缩成manpath.config.bz2格式,并删除manpath.config,z表示压缩参数

      bzip2 -d manpath.config.bz2  ->  将manpath.config.bz2解压缩成manpath.config格式,并删除manpath.config.bz2,d表示解压缩参数
      bzip2 -c manpath.config > manpath.config.bz2  ->  将manpath.config压缩成manpath.config.bz2格式,并保留manpath.config

      bzcat manpath.config.bz2  ->  读取压缩文件manpath.config.bz2 的内容

    2. 打包命令:tar

      tar -jcv -f /root/etc.tar.bz2 /etc   ->  将/etc文件打包到/root/etc.tar.bz2中  

      tar -jtv -f /root/etc.tar.bz2   ->  查看/root/etc.tar.bz2中的数据内容

      tar -jxv -f /root/etc.tar.bz2 /etc -C /tmp   ->  将/root/etc.tar.bz2解压缩到/tmp中

  • 相关阅读:
    cpu_relax
    x86汇编寄存器,函数参数入栈说明
    内核调试打印dump_stack
    内核模块中计算执行时间
    js
    JS解析+预解析相关总结
    github-如何设置SSH Key
    块级元素与行内元素的区别
    编写高质量代码——html、css、javascript
    jquery——简单的下拉列表制作及bind()方法的示例
  • 原文地址:https://www.cnblogs.com/webberji/p/4541949.html
Copyright © 2011-2022 走看看