Linux shell编程学习笔记80:gzip命令——让文件瘦身

0 引言

Linux shell编程学习笔记76:tar命令——快照 & 备份(上)-CSDN博客

Linux shell编程学习笔记77:tar命令——快照 & 备份(下)_linux 系统快照-CSDN博客 

Linux shell编程学习笔记78:cpio命令——文件和目录归档工具(上)-CSDN博客

Linux shell编程学习笔记79:cpio命令——文件和目录归档工具(下)-CSDN博客

中,我们分别介绍了用于文件和目录归档的tar和cpio命令,为了缩小归档文件的体积,我们还可以使用压缩软件对归档文件进行压缩。

在Windows系统中,我们常用的压缩软件有WinRAR、7-Zip、WinZip、PeaZip、Bandizip等。

在Linux系统中,常用的压缩软件有gzip,plzip、p7zip、pbzip2、ebzip等。

今天我们重点研究gzip。

1 gzip 的功能,帮助信息,格式,选项和参数说明

1.1 gzip 的功能

gzip 命令是 Linux 中流行的压缩工具,用于减小文件大小,同时保留其原始内容。它是 GNU Core Utilities 包的一部分,几乎在所有 Linux 发行版上都可用。 

1.2 gzip 的帮助信息

我们可以使用 gzip -h 命令获取帮助信息。

1.2.1 bash中的gzip帮助信息

[purpleendurer @ bash ~] gzip
gzip: compressed data not written to a terminal. Use -f to force compression.
For help, type: gzip -h
[purpleendurer @ bash ~] gzip -h
Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

  -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, --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
    --rsyncable   Make rsync-friendly archive

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.
[purpleendurer @ bash ~] 

 1.2.2 银河麒麟(kylin)系统中的gzip帮助信息

[purpleendurer @ kylin ~] gzip -h
Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

  -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
  -k, --keep        keep (don't delete) input files
  -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, --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
  --rsyncable       Make rsync-friendly archive

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.
[purpleendurer @ kylin ~] 

 

1.3 gzip 的命令格式

gzip [选项]... [文件]...

1.4 gzip 的选项和参数说明

1.4.1 gzip的选项

选项说明备注
-c, --stdout写入标准输出,保持原始文件不变
-d, --decompress解压缩
-f, --force强制覆盖输出文件并压缩链接
-h, --help提供此帮助信息
-k, --keep保留(不删除)输入文件

不是所有版本的gzip都支持此参数

已知1.5不支持,1.6支持

-l, --list列出压缩文件内容
-L, --license显示软件许可证
-n, --no-name不保存或恢复原始名称和时间戳
-N, --name保存或恢复原始名称和时间戳
-q, --quiet抑制所有警告
-r、--recursive对目录递归操作
-S, --suffix=SUF在压缩文件上使用后缀 SUF
-t, --test测试压缩文件的完整性建议同时指定-v选项
-v, --verbose详细模式,显示详细的压缩或解压缩过程
-V、--version显示版本号
-1, --fast压缩速度更快
-9, --best压缩得更好
--rsyncable制作 rsync 友好的存档

1.4.2 gzip的参数

文件:表示要压缩或解压缩的一个或多个文件。 

2 gzip使用实例

2.1 创建演示文件和目录

我们使用 echo 命令和输出重定向创建文件f1.txt 和 f2.txt,使用mkdir命令创建目录d1,再使用 echo 命令和输出重定向在目录d1下面创建文件fa.txt 和 fb.txt
 

[purpleendurer @ bash ~ ] echo "f1" > f1.txt
[purpleendurer @ bash ~ ] echo "f2" > f2.txt
[purpleendurer @ bash ~ ] mkdir d1
[purpleendurer @ bash ~ ] echo "d1fa" > d1/fa.txt
[purpleendurer @ bash ~ ] echo "d1fb" > d1/fb.txt
[purpleendurer @ bash ~ ] ls -R
.:
Code  d1  f1.txt  f2.txt

./Code:

./d1:
fa.txt  fb.txt
[purpleendurer @ bash ~ ] 

 

2.2 压缩单个文件

2.2.1 压缩单个文件后删除源文件  

例如:使用gzip压缩当前目录下文件f1.txt的命令 :gzip f1.txt 

[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt  f2.txt
[purpleendurer @ bash ~ ] gzip f1.txt
[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt.gz  f2.txt
[purpleendurer @ bash ~ ] 

执行压缩命令后,我们会发现在当前目录下,被压缩的源文件f1.txt不见了,多了一个压缩后的目标文件 f1.txt.gz。

注意:在默认情况下,gzip压缩指定的文件,并为它加上 .gz 扩展名。源文件会被删除。 

2.2.2 压缩单个文件后保留源文件  

如果我们希望压缩文件后仍然保留源文件,该如何操作呢?

例如使用gzip压缩当前目录下文件f2.txt,压缩后不删除f2.tx

如果我们使用的gzip支持-k 选项,那么可以使用 -k 选项,命令为 :

gzip -k f2.txt 

如果我们使用的gzip不支持-k 选项,那么可以使用-c选项结合输出重定向来操作,命令为:

gzip -c f2.txt > f2.txt.gz

[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt.gz  f2.txt
[purpleendurer @ bash ~ ] gzip -k f2.txt
gzip: invalid option -- 'k'
Try `gzip --help' for more information.
[purpleendurer @ bash ~ ] gzip -c f2.txt > f2.txt.gz
gzip: f2.txt : No such file or directory
[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt.gz  f2.txt  f2.txt.gz
[purpleendurer @ bash ~ ] 

在上面的操作中,我们先尝试了命令: gzip -k f2.txt ,但是很不幸的是,我们使用的gzip不支持-k选项。

接着我们尝试了命令:gzip -c f2.txt > f2.txt.gz,虽然我们收到了出错提示信息:

gzip: f2.txt : No such file or directory

但是,我们使用ls命令会发现压缩文件f2.txt.gz。

要想避免收到上面所说的出错提示信息。

我们可以使用命令:

gzip  < f1.txt > f2.txt.gz

[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt  f2.txt
[purpleendurer @ bash ~ ] gzip  < f1.txt > f2.txt.gz
[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt  f2.txt  f2.txt.gz
[purpleendurer @ bash ~ ] 

2.3 压缩多个文件

压缩当前目录下的文件f1.txt f2.txt,命令为:

gzip f1.txt f2.txt

[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt  f2.txt  f2.txt.gz
[purpleendurer @ bash ~ ] gzip f1.txt f2.txt
gzip: f2.txt.gz already exists; do you wish to overwrite (y or n)? y
[purpleendurer @ bash ~ ] ls
Code  d1  f1.txt.gz  f2.txt.gz
[purpleendurer @ bash ~ ] 

在执行压缩命令的过程中,由于当前目录下已经存在文件f2.txt.gz,所以会提示是否覆盖该文件。

2.4 递归压缩目录树下的文件

为了实现递归压缩,我们要指定 -r 选项。

为了演示效果,我们在目录d1下再创建目录d2,在目录d2下创建文件fc.txt和fd.txt

[purpleendurer @ bash ~ ] mkdir d1/d2
[purpleendurer @ bash ~ ] echo "d2fc" > d1/d2/fc.txt
[purpleendurer @ bash ~ ] echo "d2fd" > d1/d2/fd.txt
[purpleendurer @ bash ~ ] ls -R
.:
Code  d1  f1.txt  f2.txt

./Code:

./d1:
d2  fa.txt  fb.txt

./d1/d2:
fc.txt  fd.txt
[purpleendurer @ bash ~ ] 

然后我们将目录d1及子目录下的文件进行压缩

[purpleendurer @ bash ~ ] ls -R
.:
Code  d1  f1.txt  f2.txt

./Code:

./d1:
d2  fa.txt  fb.txt

./d1/d2:
fc.txt  fd.txt
[purpleendurer @ bash ~ ] gzip -rv d1
d1/d2/fd.txt:   -40.0% -- replaced with d1/d2/fd.txt.gz
d1/d2/fc.txt:   -40.0% -- replaced with d1/d2/fc.txt.gz
d1/fb.txt:      -40.0% -- replaced with d1/fb.txt.gz
d1/fa.txt:      -40.0% -- replaced with d1/fa.txt.gz
[purpleendurer @ bash ~ ] ls -R
.:
Code  d1  f1.txt  f2.txt

./Code:

./d1:
d2  fa.txt.gz  fb.txt.gz

./d1/d2:
fc.txt.gz  fd.txt.gz
[purpleendurer @ bash ~ ] 

为了更好地看到命令执行的过程和效果,我们指定了-v选项。

2.4 指定压缩速度

我们可以为gzip指定一个压缩速度,其速度范围值为1——9。

1 是最快的压缩,压缩率最低

9 是最慢的压缩,压缩率最高

默认是 6

2.4.1 汉字

我们先拿汉字试一下。

[purpleendurer @ bash ~ ] echo "LZ77 的基本原理:LZ77 以经常出现的字母组合(或较长的字符串)构建字典中的数据项,并且使用较短的数字(或符号)编码来代替比较复杂的数据 项。数据压缩时,将从待压缩数据中读入的源数据与字典中的数据项进行匹配,从中检索出相应的代码并输出。从而实现数据的压缩。" > f3.txt
[purpleendurer @ bash ~ ] gzip -1 -cv < f3.txt > f3-1.gz
 29.6%
[purpleendurer @ bash ~ ] gzip -4 -cv < f3.txt > f3-4.gz
 29.6%
[purpleendurer @ bash ~ ] gzip -9 -cv < f3.txt > f3-9.gz
 29.6%
[purpleendurer @ bash ~ ] gzip -cv < f3.txt > f3-9.gz
 29.6%
[purpleendurer @ bash ~ ] 

 

我们先把一段汉字存放在文件 f3.txt中,然后分别指定压缩速度 1、4、9和默认(6)来进行压缩。

从命令执行信息来看,压缩率没有差别。 

2.4.2 英文

我们再用常用英文单词试一下:

[purpleendurer @ bash ~ ] echo "I, you, he, she, it, we, they,be, have, do, go, make, see, take, get, give,person, time, day, year, way, man, woman, child, government, company,good, bad, big, little, new, old, happy, sad, beautiful, ugly,very, really, so, too, then, now, well, just, also, still,a, an, the,in, on, at, with, for, about, from, over, under, between,and, but, or, so, because, if, when, while, although, before, after,one, two, three, four, five, ten, hundred, thousand, million,hello, goodbye, please, thank you, sorry, excuse me, yes, no,I, you, he, she, it, we, they,be, have, do, go, make, see, take, get, give,person, time, day, year, way, man, woman, child, government, company,good, bad, big, little, new, old, happy, sad, beautiful, ugly,very, really, so, too, then, now, well, just, also, still,a, an, the,in, on, at, with, for, about, from, over, under, between,and, but, or, so, because, if, when, while, although, before, after,one, two, three, four, five, ten, hundred, thousand, million,hello, goodbye, please, thank you, sorry, excuse me, yes, no" > f4.txt
[purpleendurer @ bash ~ ] gzip -1 -cv < f4.txt > f4-1.gz
 70.7%
[purpleendurer @ bash ~ ] gzip -4 -cv < f4.txt > f4-4.gz
 71.0%
[purpleendurer @ bash ~ ] gzip -9 -cv < f4.txt > f4-9.gz
 71.0%
[purpleendurer @ bash ~ ] gzip -cv < f4.txt > f4-9.gz
 71.0%
[purpleendurer @ bash ~ ] 

我们先把常用英文单词存放在文件 f4.txt中,然后分别指定压缩速度 1、4、9和默认(6)来进行压缩。

从4开始,压缩率没有变化。所以一般使用默认(6)就可以了。

 2.5 测试压缩文件的完整性

我们可以使用选项-t或 --test来测试压缩文件的完整性。

例如:测试文件f3.txt.gz的完整性

[purpleendurer @ bash ~ ] gzip -cv < f3.txt > f3.txt.gz
 29.6%
[purpleendurer @ bash ~ ] gzip -t f3.txt.gz
[purpleendurer @ bash ~ ] gzip -tv f3.txt.gz
f3.txt.gz:       OK
[purpleendurer @ bash ~ ] 

 

可以看到, 执行命令:gzip -t f3.txt.gz 没反馈信息。

执行命令 gzip -tv f3.txt.gz 才看到反馈信息:

f3.txt.gz:       OK

注意:为了看到测试结果,建议同时指定-v选项。

2.6 查看压缩文件的详细信息

我们可以指定 -l 选项可以查看 .gz 文件的详细信息。

例如,查看f3.txt.gz的详细信息

[purpleendurer @ bash ~ ] gzip -l f3.txt.gz
         compressed        uncompressed  ratio uncompressed_name
                279                 371  29.6% f3.txt
[purpleendurer @ bash ~ ] 

2.7 解压文件

我们可以使用选项 -d 或--decompress 来对压缩文件进行 解压缩。

例如,对压缩文件 f3.txt.gz 进行 解压缩

[purpleendurer @ bash ~ ] ls
Code  f3-1.gz  f3-4.gz  f3-9.gz  f3.txt
[purpleendurer @ bash ~ ] gzip -c < f3.txt >  f3.txt.gz
[purpleendurer @ bash ~ ] ls
Code  f3-1.gz  f3-4.gz  f3-9.gz  f3.txt  f3.txt.gz
[purpleendurer @ bash ~ ] gzip -dv f3.txt.gz
gzip: f3.txt already exists; do you wish to overwrite (y or n)? n
        not overwritten
[purpleendurer @ bash ~ ] gzip -dfv f3.txt.gz
f3.txt.gz:       29.6% -- replaced with f3.txt
[purpleendurer @ bash ~ ] ls
Code  f3-1.gz  f3-4.gz  f3-9.gz  f3.txt
[purpleendurer @ bash ~ ] 

 

我们执行命令gzip -dv f3.txt.gz时,由于当前目录中存在文件f3.txt,会要求我们确定是否覆盖原有文件:

gzip: f3.txt already exists; do you wish to overwrite (y or n)? 

我们输入n后,反馈信息:

        not overwritten

没有覆盖原有文件。

如果我们不想接收和处理是否覆盖原有文件的信息,我们可以使用 -f选项强制覆盖原有文件。

所以我们执行命令 gzip -dfv f3.txt.gz 时 会直接覆盖原有文件f3.txt:

f3.txt.gz:       29.6% -- replaced with f3.txt 

2.8 查看版本信息

 我们可以使用-V选项查看当前使用的gzip版本信息。

2.8.1 测试用的bash中的gzip版本信息

[purpleendurer @ bash ~ ] gzip -V
gzip 1.5
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
[purpleendurer @ bash ~ ] 

 

2.8.2 银河麒麟(kylin)系统中的gzip版本信息

[purpleendurer @ kylin ~] gzip -v
gzip: compressed data not written to a terminal. Use -f to force compression.
For help, type: gzip -h
[purpleendurer @ kylin ~] gzip -V
gzip 1.6
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
[purpleendurer @ kylin ~] 

 

看来gzip的1.5版本不支持-k选项,而1.6版本支持-k选项。

2.9 查看软件许可证信息

我们可以使用-L 或 --license 选项 查看软件许可证信息。

2.9.1 测试用的bash中的gzip软件许可证信息

[purpleendurer @ bash ~ ] gzip -L
gzip 1.5
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
[purpleendurer @ bash ~ ] 

显示的信息跟版本信息相似。

如果我们同时查看gzip版本和软件许可证信息会如何显示呢?

[purpleendurer @ bash ~ ] gzip -VL
gzip 1.5
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
[purpleendurer @ bash ~ ] 

 

显示的是软件许可证信息。

2.9.2 银河麒麟(kylin)系统中的gzipgzip软件许可证信息

[purpleendurer @ kylin ~] gzip -L
gzip 1.6
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
[purpleendurer @ kylin ~] 

3  LZ77编码

gzip 使用 LZ77  编码来压缩和解压文件。

LZ 编码由以色列研究者 Jacob Ziv 和 Abraham Lempel 提出,是无损压缩的核心思想。LZ 是一个系列的算法,而其中最基本的就是两人在 1977年所发表的论文《A Universal Algorithm for Sequential Compression》 中提出的 LZ77 算法。

LZ77的核心思想:利用数据的重复结构信息来进行数据压缩。

而Huffman等基于统计的数据压缩编码需要先对数据进行字符频率统计,然后进行压缩。

LZ77 的基本原理:LZ77 以经常出现的字母组合(或较长的字符串)构建字典中的数据项,并且使用较短的数字(或符号)编码来代替比较复杂的数据项。数据压缩时,将从待压缩数据中读入的源数据与字典中的数据项进行匹配,从中检索出相应的代码并输出。从而实现数据的压缩。

LZ77 编码是一种基于字典及滑动窗口的无损压缩技术,广泛应用于通信传输。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/875842.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

10万人服务器配置如何选择?10w并发量配置架构

10万并发量的应用如何选择阿里云服务器配置&#xff1f;首先要选择云服务器ECS实例规格&#xff0c;因为是10万并发量需要配置负载均衡&#xff0c;而且还要使用缓存技术&#xff0c;阿里云服务器网aliyunfuwuqi.com从阿里云官网整理的关于阿里云10万并发量服务器配置和案例分享…

哈工大“计算机设计与实践”(cpu)处理器实验设计报告

哈工大“计算机设计与实践”&#xff08;cpu&#xff09;处理器实验设计报告 【哈工大“计算机设计与实践”&#xff08;cpu&#xff09;处理器实验设计报告】 在计算机科学领域&#xff0c;CPU&#xff08;中央处理器&#xff09;是计算机系统的核心部件&#xff0c;负责执行指…

【我的 PWN 学习手札】Fastbin Double Free

前言 Fastbin的Double Free实际上还是利用其特性产生UAF的效果&#xff0c;使得可以进行Fastbin Attack 一、Double Free double free&#xff0c;顾名思义&#xff0c;free两次。对于fastbin这种单链表的组织结构&#xff0c;会形成这样一个效果&#xff1a; 如果我们mallo…

如何下载各个版本的tomcat-比如tomcat9

1&#xff0c;找到tomcat官网https://tomcat.apache.org/ Apache Tomcat - Welcome! 找到tomcat9&#xff0c;或者archives 1.1&#xff0c;找到对应版本 1.2&#xff0c;找到小版本 1.3&#xff0c;找到bin 2&#xff0c;Index of /dist/tomcat/tomcat-9/v9.0.39/bin 2.1&a…

【知识图谱】3.Protege下载安装

一、Protege 1.相关介绍 Protg软件是斯坦福大学医学院生物信息研究中心基于Java语言开发的本体编辑和知识获取软件&#xff0c;或者说是本体开发工具&#xff0c;也是基于知识的编辑器&#xff0c;属于开放源代码软件。 这个软件主要用于语义网中本体的构建&#xff0c;是语义…

烂番茄96%高分恐怖片来袭,吓到连呼吸都小心

今年的恐怖片市场中&#xff0c;出人意料地杀出了一匹黑马&#xff0c;一部名叫《咒物寻凶》的爱尔兰小成本电影在大牌影片扑街的背景下异军突起&#xff0c;成为不少恐怖片爱好者口中的惊喜之作。这部由达米安麦卡锡执导的电影虽然制作成本有限&#xff0c;却凭借独特的民俗恐…

9天也能养成ins账号!超详细操作指南

Instagram&#xff0c;作为全球最受欢迎的社交媒体平台之一&#xff0c;为跨境电商卖家们提供了一个展示产品、吸引潜在客户的绝佳舞台。然而&#xff0c;受限于ins的规则&#xff0c;要想在这个平台上进行产品的宣传并非易事。 这就是为什么我们需要精心培养一个ins账号&#…

F1C100S/F1C200S的资料来源说明

文章目录 常用板子开源创客荔枝派榴莲派 我想说是的官网啥资料都没有。但是它的资料又很多&#xff0c;从淘宝或者其他地方能都搜到很多。 http://wiki.lcmaker.com/index.php?titleLC-PI-200S https://github.com/peng-zhihui/Planck-Pi?tabreadme-ov-file#head4 http://do…

[苍穹外卖]-10WebSocket入门与实战

WebSocket WebSocket是基于TCP的一种新的网络协议, 实现了浏览器与服务器的全双工通信, 即一次握手,建立持久连接,双向数据传输 区别 HTTP是短连接, WebSocket是长连接HTTP单向通信, 基于请求响应模型WebSocket支持双向通信 相同 HTTP和WebSocket底层都是TCP连接 应用场景…

基于Java+SpringBoot+Vue+MySQL的西安旅游管理系统网站

作者&#xff1a;计算机学姐 开发技术&#xff1a;SpringBoot、SSM、Vue、MySQL、JSP、ElementUI等&#xff0c;“文末源码”。 专栏推荐&#xff1a;前后端分离项目源码、SpringBoot项目源码、SSM项目源码 系统展示 基于SpringBootVue的西安旅游管理系统网站【附源码文档】、…

跨系统环境下LabVIEW程序稳定运行

在LabVIEW开发中&#xff0c;不同电脑的配置和操作系统&#xff08;如Win11与Win7&#xff09;可能对程序的稳定运行产生影响。为了确保程序在不同平台上都能正常且稳定运行&#xff0c;需要从兼容性、驱动、以及性能优化等多个方面入手。本文将详细介绍如何在不同系统环境下&a…

视频监控基础学习

IPC&#xff1a;网络摄像机 NVR&#xff1a;网络硬盘录像机产品&#xff0c;搭配IPC使用。集成存储、解码显示、拼接控制、智能分析等多种功能于一体。一机多用&#xff0c;部署简单&#xff0c;功能齐全。安全可靠&#xff0c;适用于各类场景。 ONVIF协议&#xff1a;网络摄像…

Docker:对已有的容器,对当前容器映射的端口实时 (增删改查)

首先我的docker已经起了一个容器&#xff0c;我突然想把他的80->80映射的端口改成80->8080 但是我不想去新启动容器&#xff0c;想在现有容器基础上去修改&#xff0c;或者我想删除某个端口映射&#xff08;只是大概思路&#xff09; 如何寻找容器配置文件位置 首先我这…

代码随想录27期|Python|Day54|​单调栈|​42. 接雨水|84. 柱状图中最大的矩形

42. 接雨水 根据常识可以归纳出&#xff0c;对于每一列所能够存住的水的高度 Height min(LeftMax, RightMax) - height 也就是&#xff0c;当前列的存水高度 左侧和右侧柱子的最大高度的较小值&#xff0c;减去当前列的柱子高度&#xff0c;所得到的差值。 可以验证第4列&…

如何通过OceanBase的多级弹性扩缩容能力应对业务洪峰

每周四晚上的10点&#xff0c;都有近百万的年轻用户进入泡泡玛特的抽盒机小程序&#xff0c;共同参与到抢抽盲盒新品的活动中。瞬间的并发流量激增对抽盒机小程序的系统构成了巨大的挑战&#xff0c;同时也对其数据库的扩容能力也提出了更高的要求。 但泡泡玛特的工程师们一点…

【系统架构师】-论文-2024-2009年系统架构师历年论文题目

2024年5月 大数据Lambda架构的应用与分析 云原生云上DevOps运维应用与分析 模型驱动软件开发方法与应用 论单元测试在软件回归测试中的应用和分析 2023年 论面向对象设计的应用与实现 论多数据源集成的应用与实现 论软件可靠性模型的设计与实现 论边缘计算技术的设计与实现 …

【Linux】3.切换操作系统

文章目录 1. 为什么要切换操作系统2. 如何备份操作系统文件3.如何切换操作系统4. 在Ubuntu操作系统中恢复文件 1. 为什么要切换操作系统 由于CentoS官方宣布不再维护了&#xff0c;为了避免服务器安全和各类环境问题&#xff0c;我将云服务器改为Ubuntu操作系统。 Ubuntu 不仅…

HarmonyOS开发实战( Beta5.0)自动生成动态路由实践

鸿蒙HarmonyOS开发往期必看&#xff1a; HarmonyOS NEXT应用开发性能实践总结 最新版&#xff01;“非常详细的” 鸿蒙HarmonyOS Next应用开发学习路线&#xff01;&#xff08;从零基础入门到精通&#xff09; 介绍 本示例将介绍如何使用装饰器和插件&#xff0c;自动生成动…

使用Azure Devops Pipeline将Docker应用部署到你的Raspberry Pi上

文章目录 1. 添加树莓派到 Agent Pool1.1 添加pool1.2 添加agent 2. 将树莓派添加到 Deployment Pool2.1 添加pool2.2 添加target 3. 添加编译流水线3.1 添加编译命令3.2 配置触发器 4. 添加发布流水线4.1 添加命令行4.2 配置artifact和触发器 5. 完成 1. 添加树莓派到 Agent P…

三菱FX5U CPU 内置以太网功能

什么是内置以太网功能FX5CPU模块内置以太网通信端口&#xff0c;可以利用TCP/IPUDP/IP通信协议&#xff0c;经过以太网(100BASE-TX、10BASET)与计算机或其他以太网设备进行通信。 MELSOFT连接 与MELSOFT产品连接的功能&#xff0c;MELSOFT产品主要指三菱的软件及GOT。 SLMP通信…