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
    
  • 相关阅读:
    Java 基础
    Java 数据类型
    Spring 拦截器实现事物
    SSH 配置日记
    Hibernate 知识提高
    Jsp、Servlet
    leetcode 97. Interleaving String
    leetcode 750. Number Of Corner Rectangles
    leetcode 748. Shortest Completing Word
    leetcode 746. Min Cost Climbing Stairs
  • 原文地址:https://www.cnblogs.com/yangtao416/p/14490648.html
Copyright © 2011-2022 走看看