zoukankan      html  css  js  c++  java
  • ①打包命令 gzip bz2

    只能压缩文件 打包后会删除源文件

    gzip 注释文件
    [root@rstx-53 test]# gzip file1  #压缩
    [root@rstx-53 test]# ls
    1  file10  file1.gz  file2  file3  file4  file5  file6  file7  file8  file9
    
    [root@rstx-53 test]# gzip -d file1.gz  #解压
    [root@rstx-53 test]# ls
    1  file1  file10  file2  file3  file4  file5  file6  file7  file8  file9
    
    [root@rstx-53 test]# gzip 1/test.txt 
    [root@rstx-53 test]# ls
    1  file10  file1.gz  file2  file3  file4  file5  file6  file7  file8  file9
    [root@rstx-53 test]# zcat 1/test.txt.gz 
    1
    
    
    zip
    [root@rstx-53 test]# zip backup.zip ./*  打包文件
      adding: 1/ (stored 0%)
      adding: file1 (stored 0%)
      adding: file10 (stored 0%)
      adding: file2 (stored 0%)
      adding: file3 (stored 0%)
      adding: file4 (stored 0%)
      adding: file5 (stored 0%)
      adding: file6 (stored 0%)
      adding: file7 (stored 0%)
      adding: file8 (stored 0%)
      adding: file9 (stored 0%)
    
    [root@rstx-53 test]# zip -r backup.zip  /etc/  目录打包
     adding: etc/migrations (stored 0%)
      adding: etc/resolv.conf.save (stored 0%)
      adding: etc/nsswitch.conf.rpmnew (deflated 58%)
      adding: etc/named/ (stored 0%)
      adding: etc/named.rfc1912.zones (deflated 60%)
      adding: etc/named.namedmanager.conf (stored 0%)
      adding: etc/subgid- (deflated 45%)
    [root@rstx-53 test]# du -sh backup.zip 
    1.4G	backup.zip
    
  • 相关阅读:
    UltraEdit的配置
    字符编码笔记:ASCII,Unicode和UTF-8
    Hello World Hexo
    好久不见,味素
    记一次springboot+dubbo+zookeeper吐血的问题
    [深度学习]模型部署之优化
    [深度学习]pytorch部署之onnx
    count(*)、count(1)、count(column)
    like %和-的区别与使用
    SQL语言分类
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14490648.html
Copyright © 2011-2022 走看看