<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Storage (系统存储) &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-sep-2022.github.io/category/system/system-space-system-directory-system-file/system-storage/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-sep-2022.github.io/</link>
	<description></description>
	<lastBuildDate>Thu, 08 Sep 2022 06:42:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[命令] Linux 命令 locate （查找文件）</title>
		<link>https://eternalcenter-sep-2022.github.io/locate/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 01 Aug 2022 12:50:19 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27463</guid>

					<description><![CDATA[内容一：locate 命令的安装 1.1 安装 locate 命令 1.2 更新 locate 数据库 （注意：如果不更新 locate 数据库，在使用 locate 命令后可能会报错 ） 内容二：locate 命令的选项 1) -b 或者 &#8211;basename 只显示使用指定模式匹配名称的条目2) -c 或者 &#8211;count 只显示找的数量3) -e 或者 &#8211;existing 只显示存在的条目4) -i 或者 &#8211;ignore-case 查找时忽略大小写5) -r 或者 &#8211;regexp 使用正则表达式6) &#8211;regex 使用扩展正则表达式 内容三：locate 命令的案例 3.1 案例一：查找包含 passwd 的文件 3.2 案例二：在 /etc/ 目录下查找以 sh 开头的文件 3.3 案例三：在当前目录下查找以 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/locate/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 locate （查找文件）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：locate 命令的安装</h3>



<h4>1.1 安装 locate 命令</h4>



<pre class="wp-block-code"><code># dnf install mlocate</code></pre>



<h4>1.2 更新 locate 数据库</h4>



<pre class="wp-block-code"><code># updatedb</code></pre>



<p>（<br>注意：如果不更新 locate 数据库，在使用 locate 命令后可能会报错</p>



<pre class="wp-block-code"><code>locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory</code></pre>



<p>）</p>



<h3>内容二：locate 命令的选项</h3>



<p>1) -b 或者 &#8211;basename 只显示使用指定模式匹配名称的条目<br>2) -c 或者 &#8211;count 只显示找的数量<br>3) -e 或者 &#8211;existing 只显示存在的条目<br>4) -i 或者 &#8211;ignore-case 查找时忽略大小写<br>5) -r 或者 &#8211;regexp 使用正则表达式<br>6) &#8211;regex 使用扩展正则表达式</p>



<h3>内容三：locate 命令的案例</h3>



<h4>3.1 案例一：查找包含 passwd 的文件</h4>



<pre class="wp-block-code"><code># locate passwd</code></pre>



<h4>3.2 案例二：在 /etc/ 目录下查找以 sh 开头的文件</h4>



<pre class="wp-block-code"><code># locate /etc/sh</code></pre>



<h4>3.3 案例三：在当前目录下查找以 r 开头的文件并忽略大小写</h4>



<pre class="wp-block-code"><code># locate -i ~/r</code></pre>



<h4>3.4 案例四：使用正则表达式超找包含 1.txt 或 2.txt 的文件</h4>



<pre class="wp-block-code"><code># locate -r &#91;1-2].txt</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Linux 启动顺序</title>
		<link>https://eternalcenter-sep-2022.github.io/linux-start-sequence/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 18 Jul 2022 05:45:40 +0000</pubDate>
				<category><![CDATA[Articles (文章)]]></category>
		<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Creations (创作)]]></category>
		<category><![CDATA[Information Technology (IT) Articles (信息技术类文章)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26977</guid>

					<description><![CDATA[第一步启动：BIOS/UEFI BIOS （Basic Input Output System） 即基本输入输出系统。 UEFI （Unified Extensible Firmware Interface） 即可扩展固件接口。 它们的主要作用是为计算机提供直接、底层的硬件控制和设置。UEFT 是 BIOS 的升级替代方案。 第二步启动：MBR/GPT MBR （Master Boot Record） 即主引导记录。MBR 通常和 BIOS 搭配，最大分区容量不能超过 2T，最多可以有 3 个主分区，1 个扩展分区，不过扩展分区里可以有多个逻辑分区。 GPT （GUID Partition Table） 即全局唯一标识分区表。GPT 通常和 UEFI 搭配。 它们都是读取硬盘时最先读取的分区，里面有各自的启动代码。 第三步启动：GRUB2 GRUB2 （GRand Unified Bootloader version 2） 即多操作系统启动程序，可以选择系统分区上不同的系统内核，同时也可以向启动的内核传递参数。 第四步启动：initrd/Kernel initrd （init ramdisk） 即初始化内存盘，作用是：1. 提供开机必备的单 kernel 文件 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/linux-start-sequence/" class="more-link">Continue reading<span class="screen-reader-text"> "Linux 启动顺序"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>第一步启动：BIOS/UEFI</h3>



<p>BIOS （Basic Input Output System） 即基本输入输出系统。</p>



<p>UEFI （Unified Extensible Firmware Interface） 即可扩展固件接口。</p>



<p>它们的主要作用是为计算机提供直接、底层的硬件控制和设置。UEFT 是 BIOS 的升级替代方案。</p>



<h3>第二步启动：MBR/GPT</h3>



<p>MBR （Master Boot Record） 即主引导记录。MBR 通常和 BIOS 搭配，最大分区容量不能超过 2T，最多可以有 3 个主分区，1 个扩展分区，不过扩展分区里可以有多个逻辑分区。</p>



<p>GPT （GUID Partition Table） 即全局唯一标识分区表。GPT 通常和 UEFI 搭配。</p>



<p>它们都是读取硬盘时最先读取的分区，里面有各自的启动代码。</p>



<h3>第三步启动：GRUB2</h3>



<p>GRUB2 （GRand Unified Bootloader version 2） 即多操作系统启动程序，可以选择系统分区上不同的系统内核，同时也可以向启动的内核传递参数。</p>



<h3>第四步启动：initrd/Kernel</h3>



<p>initrd （init ramdisk） 即初始化内存盘，作用是：1. 提供开机必备的单 kernel 文件 （vmlinuz） 没有提供的驱动模块。2. 通过引导加载程序加载内存，将内存视为临时根目录，从中运行程序，之后再将根目录转移到硬盘上真正的根目录上。</p>



<h3>第五步启动：systemdprocess</h3>



<p>systemdprocess，即启动各类程序和进程。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] audit 的设置 （日志保存时间）</title>
		<link>https://eternalcenter-sep-2022.github.io/audit-log-save-time/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 18 Jul 2022 01:45:08 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[Storage Service (存储服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Privilege Security (系统权限安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Security Log (系统安全日志)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26972</guid>

					<description><![CDATA[方法一：通过 audit 配置文件设置 1.1 设置 audit 日志的保存时间 确保部分内容如下： （补充：这里以1) 开启 audit 日志 （local_events = yes） （write_logs = yes）2) 将 audit 日志写入 /var/log/audit/audit.log 文件 （log_file = /var/log/audit/audit.log）3) audit 日志每达到 8M 大小就将旧的 audit 日志进行备份并创建新的 audit 日志 （max_log_file = 8） （max_log_file_action = ROTATE），也可以修改成： max_log_file_action = keep_logs4) 旧的 audit 日志保存 5 份 （num_logs =5）为例） 1.2 让设置的 audit 时间生效 方法二：通过 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/audit-log-save-time/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] audit 的设置 （日志保存时间）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>方法一：通过 audit 配置文件设置</h3>



<h4>1.1 设置 audit 日志的保存时间</h4>



<pre class="wp-block-code"><code># vim /etc/audit/auditd.conf</code></pre>



<p>确保部分内容如下：</p>



<pre class="wp-block-code"><code>......
local_events = yes
......
write_logs = yes
......
log_file = /var/log/audit/audit.log
......
max_log_file = 8
......
num_logs =5
......
max_log_file_action = ROTATE
......</code></pre>



<p>（<br>补充：这里以<br>1) 开启 audit 日志 （local_events = yes） （write_logs = yes）<br>2) 将 audit 日志写入 /var/log/audit/audit.log 文件 （log_file = /var/log/audit/audit.log）<br>3) audit 日志每达到 8M 大小就将旧的 audit 日志进行备份并创建新的 audit 日志 （max_log_file = 8） （max_log_file_action = ROTATE），也可以修改成： max_log_file_action = keep_logs<br>4) 旧的 audit 日志保存 5 份 （num_logs =5）<br>为例<br>）</p>



<h4>1.2 让设置的 audit 时间生效</h4>



<pre class="wp-block-code"><code># service auditd restart</code></pre>



<h3>方法二：通过 logrotate 配置文件设置</h3>



<h4>2.1 设置 audit 日志的保存时间</h4>



<pre class="wp-block-code"><code># vim /etc/logrotate.d/auditd</code></pre>



<p>创建以下内容：</p>



<pre class="wp-block-code"><code>/var/log/audit/*
{
rotate 30
daily
missingok
compress
delaycompress
postrotate
touch /var/log/audit/audit.log ||:
chmod 0600 /var/log/audit/audit.log ||:
service auditd restart
endscript
}</code></pre>



<p>（<br>补充：这里以：<br>1) 备份的日志文件保留 30 份 （rotate 30）<br>2) 每天将现在的日志文件进行备份并生成新的日志文件 （dayly）<br>）</p>



<h4>2.2 让设置的 audit 时间生效</h4>



<pre class="wp-block-code"><code># systemctl restart logrotate.service</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] audit 日志时间格式的转换</title>
		<link>https://eternalcenter-sep-2022.github.io/time-format-conversion/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 07 Jul 2022 08:00:02 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[Storage Service (存储服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Privilege Security (系统权限安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Security Log (系统安全日志)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26438</guid>

					<description><![CDATA[步骤一：创建用于 audit 转换日志时间格式的脚本 创建以下内容： （补充：这里以创建名为 time_format_conversion.pl 的用于转换 audit 日志时间格式的脚本为例） 步骤二：转换 audit 日志时间格式 或者： 或者： 或者： 或者： 或者： （补充：这里以使用名为 time_format_conversion.pl 的用于转换 audit 日志时间格式的脚本为例）]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：创建用于 audit 转换日志时间格式的脚本</h3>



<pre class="wp-block-code"><code># vim time_format_conversion.pl</code></pre>



<p>创建以下内容：</p>



<pre class="wp-block-code"><code>s/(1\d{9})/localtime($1)/e</code></pre>



<p>（补充：这里以创建名为 time_format_conversion.pl 的用于转换 audit 日志时间格式的脚本为例）</p>



<h3>步骤二：转换 audit 日志时间格式</h3>



<pre class="wp-block-code"><code># cat /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># less /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># more /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># head /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># tail /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># tail -f /var/log/audit/audit.log | perl -p time_format_conversion.pl</code></pre>



<p>（补充：这里以使用名为 time_format_conversion.pl 的用于转换 audit 日志时间格式的脚本为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 dd （读取内容并进行完整复制）</title>
		<link>https://eternalcenter-sep-2022.github.io/dd/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 15:17:59 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26430</guid>

					<description><![CDATA[内容一：dd 命令介绍 1.1 dd 命令简介 dd 是 device driver 单词的缩写，主要用于读取内容并进行完整复制，甚至可以直接复制系统环境 1.2 dd 命令的选项 1) bs= 同时设置单次输入或单词输出的数据块 （block） 的大小为 个字节，此选项也可以使用 ibs 选项设置单次输入和 obs 选项来分别设置单词输出。2) ibs= 设置单次输入的数据块 （block） 的大小为 个字节，默认为 512 字节3) obs= 设置单次输出的数据块 （block） 的大小为 个字节，默认为 512 字节4) count= 设置总共要复制的数据块数量为 N 个数量 1.3 可配合 dd 命令使用的文件 1) /dev/null 空设备，任何进入此文件的数据都会被删除，一般用于删除输出内容2) /dev/zero 二进制的零流，可以连续不断地产生二进制零流，一般用于对设备和文件进行初始化3) /dev/urandom 随机数流，可以连续不断地产生随机数流，一般用于清除机密数据，用随机的数据完全覆盖磁盘 内容二：dd 命令的案例 2.1 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/dd/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 dd （读取内容并进行完整复制）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：dd 命令介绍</h3>



<h4>1.1 dd 命令简介</h4>



<p>dd 是 device driver 单词的缩写，主要用于读取内容并进行完整复制，甚至可以直接复制系统环境</p>



<h4>1.2 dd 命令的选项</h4>



<p>1) bs= 同时设置单次输入或单词输出的数据块 （block） 的大小为 个字节，此选项也可以使用 ibs 选项设置单次输入和 obs 选项来分别设置单词输出。<br>2) ibs= 设置单次输入的数据块 （block） 的大小为 个字节，默认为 512 字节<br>3) obs= 设置单次输出的数据块 （block） 的大小为 个字节，默认为 512 字节<br>4) count= 设置总共要复制的数据块数量为 N 个数量</p>



<h4>1.3 可配合 dd 命令使用的文件</h4>



<p>1) /dev/null 空设备，任何进入此文件的数据都会被删除，一般用于删除输出内容<br>2) /dev/zero 二进制的零流，可以连续不断地产生二进制零流，一般用于对设备和文件进行初始化<br>3) /dev/urandom 随机数流，可以连续不断地产生随机数流，一般用于清除机密数据，用随机的数据完全覆盖磁盘</p>



<h3>内容二：dd 命令的案例</h3>



<h4>2.1 与分区相关的案例</h4>



<h5>2.1.1 案例一：备份分区</h5>



<pre class="wp-block-code"><code># dd if=/dev/sda1 of=/root/sda1_backup.img</code></pre>



<p>（补充：这里以将分区 /dev/sda1 备份成文件 /root/sda1_backup.img 为例）</p>



<h5>2.1.2 案例二：还原分区</h5>



<pre class="wp-block-code"><code># dd if=/root/sda1_backup.img of=/dev/sda1</code></pre>



<p>（补充：这里以将文件 /root/sda1_backup.img 还原到分区 /dev/sda1 为例）</p>



<h5>2.1.3 案例三：复制分区</h5>



<pre class="wp-block-code"><code># dd if=/dev/sda1 of=/dev/sda2</code></pre>



<p>（补充：这里以将分区 /dev/sda1 复制到分区 /dev/sda2 为例）</p>



<h4>2.2 与硬盘相关的案例</h4>



<h5>2.2.1 案例一：备份硬盘</h5>



<pre class="wp-block-code"><code># dd if=/dev/sda of=/root/sda_backup.img</code></pre>



<p>（补充：这里以将硬盘 /dev/sda 备份成文件 /root/sda_backup.img 为例）</p>



<h5>2.2.2 案例二：还原硬盘</h5>



<pre class="wp-block-code"><code># dd if=/root/sda_backup.img of=/dev/sda</code></pre>



<p>（补充：这里以将文件 /root/sda_backup.img 还原到硬盘 /dev/sda1 为例）</p>



<h5>2.2.3 案例三：复制硬盘</h5>



<pre class="wp-block-code"><code># dd if=/dev/sda of=/dev/sdb</code></pre>



<p>（补充：这里以将硬盘 /dev/sda 复制到硬盘 /dev/sdb 为例）</p>



<h4>2.3 与内存相关的案例</h4>



<h5>2.3.1 案例一：备份内存</h5>



<pre class="wp-block-code"><code># dd if=/dev/meme of=/root/mem_backup.img</code></pre>



<p>（补充：这里以将内存备份成文件 /root/mem_backup.img 为例）</p>



<h5>2.3.2 案例二：还原内存</h5>



<pre class="wp-block-code"><code># dd if=/root/mem_backup.img of=/dev/meme</code></pre>



<p>（补充：这里以将文件 /root/mem_backup.img 还原到内存为例）</p>



<h4>2.4 与软盘相关的案例</h4>



<h5>2.4.1 案例一：备份软盘</h5>



<pre class="wp-block-code"><code># dd if=/dev/fd0 of=/root/fd0_backup.img count=1 bs=1440k</code></pre>



<p>（补充：这里以将软盘备份成文件 /root/fd0_backup.img 为例）</p>



<h5>2.4.2 案例二：还原软盘</h5>



<pre class="wp-block-code"><code># dd if=/root/fd0_backup.img of=/dev/fd0 count=1 bs=1440k</code></pre>



<p>（补充：这里以将文件 /root/fd0_backup.img 还原到软盘为例）</p>



<h4>2.5 与光盘相关的案例</h4>



<h5>2.5.1 案例一：备份光盘</h5>



<pre class="wp-block-code"><code># dd if=/dev/cdrom of=/root/cd_backup.img</code></pre>



<p>（补充：这里以将光盘备份成文件 /root/cd_backup.img 为例）</p>



<h5>2.5.2 案例二：还原光盘</h5>



<pre class="wp-block-code"><code># dd if=/root/cd_backup.img of=/dev/cdrom</code></pre>



<p>（补充：这里以将文件 /root/cd_backup.img 还原到光盘为例）</p>



<h4>2.6 与预估硬盘性能相关的案例</h4>



<h5>2.6.1 案例一：预估硬盘写入性能</h5>



<pre class="wp-block-code"><code># dd if=/dev/zero bs=1024 count=1000000 of=/root/1GB.file</code></pre>



<p>（补充：这里以生成 1 个 1 GB 大小的文件，根据生成时间判断文件大小为例）</p>



<h5>2.6.2 案例二：预估硬盘读取性能</h5>



<pre class="wp-block-code"><code># dd if=/root/1GB.file bs=64k | dd of=/dev/null</code></pre>



<p>（补充：这里以读取 1 个 1 GB 大小的文件，根据读取时间判断文件大小为例）</p>



<h5>2.6.3 案例三：预估多大的块大小写入性能最佳</h5>



<p>（分别执行以下命令）</p>



<pre class="wp-block-code"><code># time dd if=/dev/zero bs=1024 count=1000000 of=/root/1GB.file</code></pre>



<pre class="wp-block-code"><code># time dd if=/dev/zero bs=2048 count=500000 of=/root/1GB.file</code></pre>



<pre class="wp-block-code"><code># time dd if=/dev/zero bs=4096 count=250000 of=/root/1GB.file</code></pre>



<p>（补充：这里以分别生成 1024、2048 和 4096 块大小的 1 GB 大小的文件，根据生成时间判断多大的块大小写入性能最佳为例）</p>



<h4>2.7 与清除机密数据相关的案例</h4>



<pre class="wp-block-code"><code># dd if=/dev/urandom of=/dev/sda</code></pre>



<p>（补充：这里以清除硬盘 /dev/sda 上的机密数据为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] 文件或目录的监控 （audit 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/monitor-directory-file-audit/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 05 Jul 2022 10:18:15 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Privilege (系统权限)]]></category>
		<category><![CDATA[System Privilege Security (系统权限安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Security Log (系统安全日志)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<category><![CDATA[System User & System Privilege (系统用户 & 系统权限)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26264</guid>

					<description><![CDATA[步骤一：使用 audit 监控文件或目录 1.1 在 audit 的策略里添加要监控的目录或文件 1.1.1 案例一：监控某个目录以及目录下的目录和文件 添加以下内容： （补充：这里以监控目录 /tmp 里的目录和文件为例） 1.1.2 案例二：监控某个文件 添加以下内容： （补充：这里以监控目录 /dev/null 文件为例） 1.2 让监控目录或文件的配置生效 步骤二：显示 audit 监控记录 （补充：记录里的1) nametype=CREATE 字段代表创建2) nametype=NORMAL 字段代表普通3) nametype=DELETE 字段代表删除） 或者： （补充：这里以显示文件被修改的记录为例）]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：使用 audit 监控文件或目录</h3>



<h4>1.1 在 audit 的策略里添加要监控的目录或文件</h4>



<h5>1.1.1 案例一：监控某个目录以及目录下的目录和文件</h5>



<pre class="wp-block-code"><code># vim /etc/audit/rules.d/audit.rules</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
-a exit,always -F dir=/tmp -F perm=rwxa</code></pre>



<p>（补充：这里以监控目录 /tmp 里的目录和文件为例）</p>



<h5>1.1.2 案例二：监控某个文件</h5>



<pre class="wp-block-code"><code># vim /etc/audit/rules.d/audit.rules</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
-a exit,always -S unlink -S unlinkat -S rmdir -S rename -S renameat -F path=/dev/null</code></pre>



<p>（补充：这里以监控目录 /dev/null 文件为例）</p>



<h4>1.2 让监控目录或文件的配置生效</h4>



<pre class="wp-block-code"><code># service auditd restart</code></pre>



<h3>步骤二：显示 audit 监控记录</h3>



<pre class="wp-block-code"><code># cat /var/log/audit</code></pre>



<p>（<br>补充：记录里的<br>1) nametype=CREATE 字段代表创建<br>2) nametype=NORMAL 字段代表普通<br>3) nametype=DELETE 字段代表删除<br>）</p>



<p>或者：</p>



<pre class="wp-block-code"><code># sudo ausearch -i -k user-modify</code></pre>



<p>（补充：这里以显示文件被修改的记录为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 lsof （显示进程）</title>
		<link>https://eternalcenter-sep-2022.github.io/lsof/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 23 Jun 2022 10:06:50 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Process (系统进程)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<category><![CDATA[System Process Security (系统进程安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<category><![CDATA[System User (系统用户)]]></category>
		<category><![CDATA[System User & System Privilege (系统用户 & 系统权限)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26135</guid>

					<description><![CDATA[内容一：lsof 命令输出结果 内容二：lsof 命令输出结果简介 1) COMMAND 进程名2) PID （Process Id） PID 号3) USER 用户4) FD 文件描述信息（补充：cwd 代表当前目录，txt 代表 txt 文件，rtd 代表 root 目录，mem 代表内存映射文件）5) TYPE 文件类型（补充：DIR 代表当前目录，REG 代表普通文件，CHR 代表字符，a_inode 代表 Inode 文件，FIFO 代表管道或者 socket文件，netlink 代表网络，unkonwn 代表未知）6) DEVICE 设备 ID7) SIZE/OFF 进程大小8) NODE 文件的 Inode 号9) NAME 路径或链接 内容三：lsof 使用案例 3.1 案例一：显示已经被删除的文件 3.2 案例二：显示用户已打开的案例 3.2.1 显示某用户已打开的文件 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/lsof/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 lsof （显示进程）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：lsof 命令输出结果</h3>



<pre class="wp-block-code"><code># lsof | more
COMMAND     PID   TID    USER   FD      TYPE             DEVICE  SIZE/OFF       NODE NAME
systemd       1          root  cwd       DIR              251,1      4096          1 /
......</code></pre>



<h3>内容二：lsof 命令输出结果简介</h3>



<p>1) COMMAND 进程名<br>2) PID （Process Id） PID 号<br>3) USER 用户<br>4) FD 文件描述信息<br>（补充：cwd 代表当前目录，txt 代表 txt 文件，rtd 代表 root 目录，mem 代表内存映射文件）<br>5) TYPE 文件类型<br>（补充：DIR 代表当前目录，REG 代表普通文件，CHR 代表字符，a_inode 代表 Inode 文件，FIFO 代表管道或者 socket文件，netlink 代表网络，unkonwn 代表未知）<br>6) DEVICE 设备 ID<br>7) SIZE/OFF 进程大小<br>8) NODE 文件的 Inode 号<br>9) NAME 路径或链接</p>



<h3>内容三：lsof 使用案例</h3>



<h4>3.1 案例一：显示已经被删除的文件</h4>



<pre class="wp-block-code"><code># lsof | grep deleted</code></pre>



<h4>3.2 案例二：显示用户已打开的案例</h4>



<h5>3.2.1 显示某用户已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -u zhumingyu mingyuzhu</code></pre>



<p>（补充：这里以显示用户 zhumingyu 和 mingyuzhu 已打开的文件为例）</p>



<h5>3.2.2 不显示某用户已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -u mingyuzhu</code></pre>



<p>（补充：这里以不显示用户 mingyuzhu 已打开的文件为例）</p>



<h4>3.3 案例三：显示进程已打开的文件</h4>



<h5>3.3.1 显示某进程已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -p 1024</code></pre>



<p>（补充：这里以显示 PID 号是 1024 已打开的文件为例）</p>



<h5>3.3.2 不显示某进程已打开的所有文件</h5>



<pre class="wp-block-code"><code># lsof -p ^1024</code></pre>



<p>（补充：这里以不显示 PID 号是 1024 已打开的文件为例）</p>



<h5>3.3.3 显示某几个进程已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -p 1,2,3</code></pre>



<p>（补充：这里以显示 PID 号是 1、2 和 3 已打开的文件为例）</p>



<h4>3.4 案例四：显示已打开的网络文件</h4>



<h5>3.4.1 显示所有已打开的网络文件</h5>



<pre class="wp-block-code"><code># lsof -i</code></pre>



<h5>3.4.2 显示所有 IPv4 协议已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i 4</code></pre>



<h5>3.4.3 显示所有 IPv6 协议已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i 6</code></pre>



<h5>3.4.4 显示所有 TCP 协议已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i TCP</code></pre>



<h5>3.4.5 显示所有 TCP 协议已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i UDP</code></pre>



<h5>3.4.6 显示某个 TCP 端口或者 UDP 端口已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i:22</code></pre>



<p>（补充：这里以显示 TCP 或者 UPD 的 22 端口已打开的文件为例）</p>



<h5>3.4.7 显示某个 TCP 端口已打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i TCP:22</code></pre>



<p>（补充：这里以显示 TCP 的 22 端口已打开的文件为例）</p>



<h5>3.4.8 显示某几个 TCP 端口打开的文件</h5>



<pre class="wp-block-code"><code># lsof -i TCP:1-1024</code></pre>



<p>（补充：这里以显示 TCP 的 1 端口到 1024 端口打开的文件为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 xz （打包、解包、压缩和解压文件）</title>
		<link>https://eternalcenter-sep-2022.github.io/xz/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 11 Jun 2022 12:29:30 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23814</guid>

					<description><![CDATA[内容一：压缩并创建 （压缩） 包 （文件） 1.1 压缩并创建 （压缩） 包 （文件） （不保留原文件） 1.1.1 压缩并创建 （压缩） 包 （某 1 个文件） （不保留原文件） （补充：压缩后的文件会以 xz 后缀结尾） 1.1.2 压缩并创建 （压缩） 包 （某几个文件） （不保留原文件） （补充：压缩后的文件会各自以 xz 后缀结尾） 1.2 压缩并创建 （压缩） 包 （文件） （保留原文件） 1.2.1 压缩并创建 （压缩） 包 （某 1 个文件） （保留原文件） （补充：压缩后的文件会以 xz 后缀结尾） 1.2.2 压缩并创建 （压缩） 包 （某几个文件） （保留原文件） （补充：压缩后的文件会各自以 xz &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/xz/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 xz （打包、解包、压缩和解压文件）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：压缩并创建 （压缩） 包 （文件）</h3>



<h4>1.1 压缩并创建 （压缩） 包 （文件） （不保留原文件）</h4>



<h5>1.1.1 压缩并创建 （压缩） 包 （某 1 个文件） （不保留原文件）</h5>



<pre class="wp-block-code"><code># xz -z &lt;file&gt;</code></pre>



<p>（补充：压缩后的文件会以 xz 后缀结尾）</p>



<h5>1.1.2 压缩并创建 （压缩） 包 （某几个文件） （不保留原文件）</h5>



<pre class="wp-block-code"><code># xz -z &lt;file 1&gt; &lt;file 2&gt; &lt;file 3&gt; ......</code></pre>



<p>（补充：压缩后的文件会各自以 xz 后缀结尾）</p>



<h4>1.2 压缩并创建 （压缩） 包 （文件） （保留原文件）</h4>



<h5>1.2.1 压缩并创建 （压缩） 包 （某 1 个文件） （保留原文件）</h5>



<pre class="wp-block-code"><code># xz -zk &lt;file&gt;</code></pre>



<p>（补充：压缩后的文件会以 xz 后缀结尾）</p>



<h5>1.2.2 压缩并创建 （压缩） 包 （某几个文件） （保留原文件）</h5>



<pre class="wp-block-code"><code># xz -zk &lt;file 1&gt; &lt;file 2&gt; &lt;file 3&gt; ......</code></pre>



<p>（补充：压缩后的文件会各自以 xz 后缀结尾）</p>



<h3> 内容二：解压 （压缩） 包</h3>



<h4>2.1 解压 （压缩） 包 （不保留原文件）</h4>



<h5>2.1.1 解压 （压缩） 包 （某 1 个 （压缩） 包） （不保留原 （压缩） 包）</h5>



<pre class="wp-block-code"><code># xz -d &lt;(compressed) package&gt;</code></pre>



<p>（注意：可以用 xz 命令解压的压缩包会以 xz 后缀结尾）</p>



<h5>2.1.2 解压 （压缩） 包 （某几个 （压缩） 包） （不保留原 （压缩） 包）</h5>



<pre class="wp-block-code"><code># xz -d &lt;(compressed) package 1&gt; &lt;(compressed) package 2&gt; &lt;(compressed) package 3&gt; ......</code></pre>



<p>（补充：解压后的文件会各自去掉 xz 后缀）</p>



<p>（注意：可以用 xz 命令解压的压缩包会以 xz 后缀结尾）</p>



<h4>2.2 解压 （压缩） 包 （保留原文件）</h4>



<h5>2.2.1 解压 （压缩） 包 （某 1 个 （压缩） 包） （保留原文件）</h5>



<pre class="wp-block-code"><code># xz -dk &lt;(compressed) package&gt;</code></pre>



<p>（注意：可以用 xz 命令解压的压缩包会以 xz 后缀结尾）</p>



<h5>2.2.2 解压 （压缩） 包 （某几个 （压缩） 包） （保留原文件）</h5>



<pre class="wp-block-code"><code># xz -dk &lt;(compressed) package 1&gt; &lt;(compressed) package 2&gt; &lt;(compressed) package 3&gt; ......</code></pre>



<p>（补充：解压后的文件会各自去掉 xz 后缀）</p>



<p>（注意：可以用 xz 命令解压的压缩包会以 xz 后缀结尾）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 目录的重新挂载</title>
		<link>https://eternalcenter-sep-2022.github.io/remount/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 11:16:53 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Privilege Security (系统权限安全)]]></category>
		<category><![CDATA[System Process Security (系统进程安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23734</guid>

					<description><![CDATA[内容一：手动重新挂载目录 （补充：这里以带 nosuid、nodev 和 noexec 参数重新挂载 /dev/shm 目录为例） 内容二：开机自动重新挂载目录 添加以下内容： （补充：这里以带 nosuid、nodev 和 noexec 参数重新挂载 /dev/shm 目录为例）]]></description>
										<content:encoded><![CDATA[
<h3>内容一：手动重新挂载目录</h3>



<pre class="wp-block-code"><code># mount -o remount,nosuid,nodev,noexec /dev/shm</code></pre>



<p>（补充：这里以带 nosuid、nodev 和 noexec 参数重新挂载 /dev/shm 目录为例）</p>



<h3>内容二：开机自动重新挂载目录</h3>



<pre class="wp-block-code"><code># vim /etc/fstab</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
tmpfs /dev/shm tmpfs defaults,nosuid,nodev,noexec 0 0</code></pre>



<p>（补充：这里以带 nosuid、nodev 和 noexec 参数重新挂载 /dev/shm 目录为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 某个所属组里有哪些用户的显示</title>
		<link>https://eternalcenter-sep-2022.github.io/group-display/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 08 Jun 2022 02:50:05 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System Login Security (系统登录安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Privilege (系统权限)]]></category>
		<category><![CDATA[System Privilege Security (系统权限安全)]]></category>
		<category><![CDATA[System Process Security (系统进程安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<category><![CDATA[System User (系统用户)]]></category>
		<category><![CDATA[System User & System Privilege (系统用户 & 系统权限)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23715</guid>

					<description><![CDATA[方法一：通过 /etc/group 配置文件显示某个附属所属组里有哪些用户 （注意：此方法并不能显示出把这些所属组当作主要所属组的用户） 方法二：通过 /etc/passwd 配置文件和 id 命令等显示主要所属组和附属所属组 （补充：可以通过肉眼比对此命令的输出结果来判断其主要所属组和附属所属组）]]></description>
										<content:encoded><![CDATA[
<h3>方法一：通过 /etc/group 配置文件显示某个附属所属组里有哪些用户</h3>



<pre class="wp-block-code"><code># cat /etc/group</code></pre>



<p>（注意：此方法并不能显示出把这些所属组当作主要所属组的用户）</p>



<h3>方法二：通过 /etc/passwd 配置文件和 id 命令等显示主要所属组和附属所属组</h3>



<pre class="wp-block-code"><code># for i in `cat /etc/passwd | egrep -v "nologin$|false$|half|sync|shutdown|halt" | awk -F: '{print $1}'`; do id $i; done | sort -k2</code></pre>



<p>（补充：可以通过肉眼比对此命令的输出结果来判断其主要所属组和附属所属组）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 Linux 运行 gzip 命令时报错 “gzip: &#8230;&#8230;.xz: unknown suffix &#8212; ignored”</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-gzip-wtmp-xz-unknown-suffix-ignored/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 29 Apr 2022 13:37:57 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23417</guid>

					<description><![CDATA[报错代码 解决方法]]></description>
										<content:encoded><![CDATA[
<h2>报错代码</h2>



<pre class="wp-block-code"><code>gzip: .......xz: unknown suffix -- ignored</code></pre>



<h2>解决方法</h2>



<pre class="wp-block-code"><code># xz -d &lt;file&gt;</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[工具] Shell 显示系统常用信息</title>
		<link>https://eternalcenter-sep-2022.github.io/shell-display-system-common-information/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 26 Apr 2022 16:14:48 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Language (语言)]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Monitor (监控)]]></category>
		<category><![CDATA[Shell Tools (工具)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Port Security (系统端口安全)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Software (系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23311</guid>

					<description><![CDATA[介绍 基本信息 作者：朱明宇名称：显示系统常用信息作用：显示系统常用信息 使用方法 1. 在此脚本的分割线内写入相应的内容2. 给此脚本添加执行权限3. 执行此脚本 脚本分割线里的变量 1. times=5 #显示系统常用信息的次数2. sleeptime=0.3 #大部分行与行之间显示的间隔时间 注意 1. 需要安装 sysstat 软件2. 执行此脚本的用户能够使用 sudo ip a s 命令3. 执行此脚本的用户能够使用 sudo ss -ntulap 命令4. 搭建了 KVM 虚拟化平台后执行此脚本的用户能够使用 sudo virsh list 命令后才能实现 脚本]]></description>
										<content:encoded><![CDATA[
<h2>介绍</h2>



<h3>基本信息</h3>



<p>作者：朱明宇<br>名称：显示系统常用信息<br>作用：显示系统常用信息</p>



<h3>使用方法</h3>



<p>1. 在此脚本的分割线内写入相应的内容<br>2. 给此脚本添加执行权限<br>3. 执行此脚本</p>



<h3>脚本分割线里的变量</h3>



<p>1. times=5 #显示系统常用信息的次数<br>2. sleeptime=0.3 #大部分行与行之间显示的间隔时间</p>



<h3>注意</h3>



<p>1. 需要安装 sysstat 软件<br>2. 执行此脚本的用户能够使用 sudo  ip a s 命令<br>3. 执行此脚本的用户能够使用 sudo ss -ntulap 命令<br>4. 搭建了 KVM 虚拟化平台后执行此脚本的用户能够使用 sudo virsh list 命令后才能实现</p>



<h2>脚本</h2>



<pre class="wp-block-code"><code>#!/bin/bash

####################### Separator ########################
times=5
sleeptime=0.3
####################### Separator ########################

nowtime=1

while (( nowtime &lt;= times))
do
        echo -e "Start Monitoring: \c"
	for i in {1..94}
	do
	        echo -e "#\c"
		sleep 0.01
        done
	echo

	sleep $sleeptime
        host=`hostname`
        echo -e "Name:\t\t\t\t\t\t\t \033&#91;1m$host\033&#91;0m"

        ip=`sudo ip a s | awk '/&#91;1-2]?&#91;0-9]{0,2}\.&#91;1-2]?&#91;0-9]{0,2}/&amp;&amp;!/127.0.0.1/{print $2}' | awk -F/ '{print $1}'`
	for iip in $(echo $ip)
        do
		sleep $sleeptime
                echo -e "IP Address:\t\t\t\t\t\t \033&#91;1m$iip\033&#91;0m"
        done

        sleep $sleeptime

        cpu=`top -bn 1 | awk -F',' '/^%Cpu/{print $4 }' | awk '{print $1}' | awk '{print 100-$1}'`
        echo -e "CPU Usage (Total):\t\t\t\t\t \033&#91;1m$cpu%\033&#91;0m"

        sleep $sleeptime

        mem=`free | grep Mem | awk '{print $3/$2 * 100.0}' | egrep -o "&#91;1]?&#91;0-9]{0,2}\.&#91;0-9]"`
        echo -e "Memory Usage (Total):\t\t\t\t\t \033&#91;1m$mem%\033&#91;0m"

	directory=`df -h | grep -v run | grep -v boot | awk '$1~/\/dev/{print $6}'`
        for idirectory in `echo $directory`
        do
                sleep $sleeptime
                directoryusage=`df -h | grep -v run | grep -v boot | awk '$1~/\/dev/{print}' | grep $idirectory$ | awk '{print $5}'`
		if &#91; $idirectory == / -o $idirectory == /sda -o $idirectory == /sdb  ];then
                        echo -e "Directory Usage ($idirectory):\t\t\t\t\t \033&#91;1m$directoryusage\033&#91;0m"
	        else
                        echo -e "Directory Usage ($idirectory):\t\t\t\t \033&#91;1m$directoryusage\033&#91;0m"
		fi
        done

	sudo -l | grep 'virsh list' &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
	        sleep $sleeptime
	        virtual=`sudo virsh list | egrep &#91;0-9] | wc -l`
	        echo -e "Number of Virtual Machines (Total):\t\t\t \033&#91;1m$virtual\033&#91;0m"
        fi

        sleep $sleeptime

        user=`who | wc -l`
        echo -e "Number of User Logins (Total):\t\t\t\t \033&#91;1m$user\033&#91;0m"

        soft=`rpm -qa | wc -l`
        echo -e "Number of Softwares (Total):\t\t\t\t \033&#91;1m$soft\033&#91;0m"

        sleep $sleeptime

        port=`sudo ss -ntulap | wc -l`
        echo -e "Number of Open Ports (Total):\t\t\t\t \033&#91;1m$port\033&#91;0m"

        which sar &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
                networkcard=`ifconfig | awk -F: '/flags/&amp;&amp;!/lo/{print $1}'`
                for inetworkcard in `echo $networkcard`
                do
                        networkread="`sar -n DEV 1 1 | grep $inetworkcard | awk '/&#91;0-9]&#91;0-9]:&#91;0-9]&#91;0-9]/{print $3/1000}'` m/s"
                        networkwrite="`sar -n DEV 1 1 | grep $inetworkcard | awk '/&#91;0-9]&#91;0-9]:&#91;0-9]&#91;0-9]/{print $4/1000}'` m/s"
			echo $inetworkcard | grep eth &amp;&gt; /dev/null
			if &#91; $?  -ne 0 ];then
	                echo -e "Network Card IO ($inetworkcard):\t\t\t\t \033&#91;1m$networkread\033&#91;0m (Read)\t\033&#91;1m$networkwrite\033&#91;0m (Write)"
		        else
	                echo -e "Network Card IO ($inetworkcard):\t\t\t\t\t \033&#91;1m$networkread\033&#91;0m (Read)\t\033&#91;1m$networkwrite\033&#91;0m (Write)"
			fi
                done
        fi

        which iostat &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
	        disk=`iostat -d -k 1 1 | awk '!/^$/&amp;&amp;!/Device/&amp;&amp;!/Linux/{print $1}'`
                for idisk in `echo $disk`
	        do
			sleep $sleeptime
		        diskread="`iostat -d -k 1 1 | grep $idisk |  awk '{print $3/1000}'` m/s"
		        diskwrite="`iostat -d -k 1 1 | grep $idisk |  awk '{print $4/1000}'` m/s"
			echo $idisk | grep 'nvme' &amp;&gt; /dev/null
			if &#91; $? -eq 0 ];then
		                echo -e "Disk IO (/dev/$idisk):\t\t\t\t\t \033&#91;1m$diskread\033&#91;0m (Read)\t\033&#91;1m$diskwrite\033&#91;0m (Write)"
		        else
		                echo -e "Disk IO (/dev/$idisk):\t\t\t\t\t \033&#91;1m$diskread\033&#91;0m (Read)\t\033&#91;1m$diskwrite\033&#91;0m (Write)"
			fi
	        done

        fi

        echo -e "Complete Monitoring: \c"
        for i in {1..91}
        do
                echo -e "#\c"
                sleep 0.01
        done
        echo
        sleep $sleeptime

        let nowtime++
done

        echo -e "Terminal Monitoring: \c"
        for i in {1..91}
        do
                echo -e "#\c"
                sleep 0.01
        done

exit</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 Linux 运行 tar 命令时报错 “tar: This does not look like a tar archive”</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-tar-this-does-not-look-like-a-tar-archive/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 11 Apr 2022 15:06:31 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23010</guid>

					<description><![CDATA[报错代码 解决方法 或者：]]></description>
										<content:encoded><![CDATA[
<h2>报错代码</h2>



<pre class="wp-block-code"><code>tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors</code></pre>



<h2>解决方法</h2>



<pre class="wp-block-code"><code># gzip -d &lt;file&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># xz -d &lt;file&gt;</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux 加密压缩 （tar 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/encryption-compression-tar/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 15:52:52 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=18392</guid>

					<description><![CDATA[步骤一：创建测试文件 （补充：这里以创建 test.txt 文件为例） 步骤二：加密压缩文件或目录 2.1 交互式加密压缩文件或目录 （补充：1) 这里以将 test.txt 文件加密压缩成 test1.tar.gz （压缩）包为例2) 如果要以 bzip2 的格式进行压缩，则将命令中的 -zcf 换成 -jcvf 将 test1.tar.gz 换成 test1.tar.bz23) 如果要以 xz 的格式进行压缩，则将命令中的 -zcf 换成 -Jcvf 将 test1.tar.gz 换成 test1.tar.xz） 2.2 非交互式加密压缩文件或目录 （补充：1) 这里以将 test.txt 文件加密压缩成 test1.tar.gz （压缩）包并且将密码设置为 eternalcenter 为例2) 如果要以 bzip2 的格式进行压缩，则将命令中的 -zcf 换成 -jcvf 将 test1.tar.gz 换成 test2.tar.bz23) 如果要以 xz &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/encryption-compression-tar/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] Linux 加密压缩 （tar 版）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：创建测试文件</h3>



<pre class="wp-block-code"><code># touch test.txt</code></pre>



<p>（补充：这里以创建 test.txt 文件为例）</p>



<h3>步骤二：加密压缩文件或目录</h3>



<h4>2.1 交互式加密压缩文件或目录</h4>



<pre class="wp-block-code"><code># tar -zcf - test.txt | openssl des3 -salt | dd of=test1.tar.gz
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
0+1 records in
0+1 records out
224 bytes copied, 7.04902 s, 0.0 kB/s</code></pre>



<p>（<br>补充：<br>1) 这里以将 test.txt 文件加密压缩成 test1.tar.gz （压缩）包为例<br>2) 如果要以 bzip2 的格式进行压缩，则将命令中的 -zcf 换成 -jcvf 将 test1.tar.gz 换成 test1.tar.bz2<br>3) 如果要以 xz 的格式进行压缩，则将命令中的 -zcf 换成 -Jcvf 将 test1.tar.gz 换成 test1.tar.xz<br>）</p>



<h4>2.2 非交互式加密压缩文件或目录</h4>



<pre class="wp-block-code"><code># tar -zcf - test.txt | openssl des3 -salt -f eternalcenter | dd of=test2.tar.gz
des3: Unrecognized flag f
des3: Use -help for summary.
0+0 records in
0+0 records out
0 bytes copied, 0.00376576 s, 0.0 kB/s</code></pre>



<p>（<br>补充：<br>1) 这里以将 test.txt 文件加密压缩成 test1.tar.gz （压缩）包并且将密码设置为 eternalcenter 为例<br>2) 如果要以 bzip2 的格式进行压缩，则将命令中的 -zcf 换成 -jcvf 将 test1.tar.gz 换成 test2.tar.bz2<br>3) 如果要以 xz 的格式进行压缩，则将命令中的 -zcf 换成 -Jcvf 将 test1.tar.gz 换成 test2.tar.xz<br>）</p>



<h3>步骤三：解压加密文件或目录</h3>



<h4>3.1 交互式解压加密文件或目录</h4>



<h5>3.1.1 删除原测试目录和里面的文件</h5>



<pre class="wp-block-code"><code># rm -rf test.txt</code></pre>



<p>（补充：这里以删除 test.txt 文件为例）</p>



<h5>3.1.2 交互式解压加密文件或目录</h5>



<pre class="wp-block-code"><code># dd if=test2.tar.gz | openssl des3 -d | tar zxf -
0+1 records in
0+1 records out
224 bytes copied, 0.000589721 s, 380 kB/s
enter des-ede3-cbc decryption password:
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.</code></pre>



<p>（<br>补充：<br>1) 这里以解压 test2.tar.gz （压缩）包为例<br>2) 如果是 bzip2 格式的（压缩）包，则将命令中的 -zxf 换成 -jcvf 将 test1.tar.gz 换成 test1.tar.bz2<br>3) 如果是 xz 格式的（压缩）包，则将命令中的 -zxf 换成 -Jcvf 将 test1.tar.gz 换成 test1.tar.xz<br>）</p>



<h4>3.2 非交互式解压加密文件或目录</h4>



<h5>3.2.1 删除原测试目录和里面的文件</h5>



<pre class="wp-block-code"><code># rm -rf test.txt</code></pre>



<p>（补充：这里以删除 test.txt 文件为例）</p>



<h5>3.2.2 非交互式解压加密文件或目录</h5>



<pre class="wp-block-code"><code># dd if=test1.tar.gz | openssl des3 -d -k eternalcenter | tar zxf -
0+1 records in
0+1 records out
224 bytes copied, 0.000574539 s, 390 kB/s
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.</code></pre>



<p>（<br>补充：<br>1) 这里以解压 test1.tar.gz （压缩）包并且解压密码为 eternalcenter 为例<br>2) 如果是 bzip2 格式的（压缩）包，则将命令中的 -zxf 换成 -jcvf 将 test1.tar.gz 换成 test1.tar.bz2<br>3) 如果是 xz 格式的（压缩）包，则将命令中的 -zxf 换成 -Jcvf 将 test1.tar.gz 换成 test1.tar.xz<br>）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux 加密压缩 （zip 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/encryption-compression-zip/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 15:48:09 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System File Security (系统文件安全)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=18388</guid>

					<description><![CDATA[步骤一：创建测试目录和测试文件 （补充：这里以创建 test 目录和里面的 test.txt 文件为例） 步骤二：加密压缩文件或目录 2.1 交互式加密压缩文件或目录 （补充：这里以将 test 目录和里面的 test.txt 文件加密压缩成 test1.zip （压缩）包为例） 2.2 非交互式加密解压文件或目录 （补充：这里以将 test 目录和里面的 test.txt 文件加密压缩成 test2.zip （压缩）包并且将密码设置为 eternalcenter 为例） 步骤三：解压加密文件或目录 3.1 交互式解压加密文件或目录 3.1.1 删除原测试目录和里面的文件 （补充：这里以删除 test 目录和里面的文件为例） 3.1.2 交互式解压加密文件或目录 （补充：这里以解压 test2.zip （压缩）包为例） 3.2 非交互式解压加密文件或目录 3.2.1 删除原测试目录和里面的文件 （补充：这里以删除 test 目录和里面的文件为例） 3.2.2 非交互式解压加密文件 （补充：这里以解压 test2.zip （压缩）包并且解压密码为 eternalcenter 为例）]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：创建测试目录和测试文件</h3>



<pre class="wp-block-code"><code># mkdir test
# touch test/test.txt</code></pre>



<p>（补充：这里以创建 test 目录和里面的 test.txt 文件为例）</p>



<h3>步骤二：加密压缩文件或目录</h3>



<h4>2.1 交互式加密压缩文件或目录</h4>



<pre class="wp-block-code"><code># zip -re test1.zip test
Enter password: 
Verify password: 
  adding: test/ (stored 0%)
  adding: test/test.txt (stored 0%)</code></pre>



<p>（补充：这里以将 test 目录和里面的 test.txt 文件加密压缩成 test1.zip （压缩）包为例）</p>



<h4>2.2 非交互式加密解压文件或目录</h4>



<pre class="wp-block-code"><code># zip -rP eternalcenter test2.zip test
  adding: test/ (stored 0%)
  adding: test/test.txt (stored 0%)</code></pre>



<p>（补充：这里以将 test 目录和里面的 test.txt 文件加密压缩成 test2.zip （压缩）包并且将密码设置为 eternalcenter 为例）</p>



<h3>步骤三：解压加密文件或目录</h3>



<h4>3.1 交互式解压加密文件或目录</h4>



<h5>3.1.1 删除原测试目录和里面的文件</h5>



<pre class="wp-block-code"><code># rm -rf test</code></pre>



<p>（补充：这里以删除 test 目录和里面的文件为例）</p>



<h5>3.1.2 交互式解压加密文件或目录</h5>



<pre class="wp-block-code"><code># unzip test2.zip
Archive:  test2.zip
   creating: test/
&#91;test2.zip] test/test.txt password: 
 extracting: test/test.txt</code></pre>



<p>（补充：这里以解压 test2.zip （压缩）包为例）</p>



<h4>3.2 非交互式解压加密文件或目录</h4>



<h5>3.2.1 删除原测试目录和里面的文件</h5>



<pre class="wp-block-code"><code># rm -rf test</code></pre>



<p>（补充：这里以删除 test 目录和里面的文件为例）</p>



<h5>3.2.2 非交互式解压加密文件</h5>



<pre class="wp-block-code"><code># unzip -P eternalcenter test1.zip 
Archive:  test1.zip
   creating: test/
 extracting: test/test.txt  </code></pre>



<p>（补充：这里以解压 test2.zip （压缩）包并且解压密码为 eternalcenter 为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 df （显示存储信息）</title>
		<link>https://eternalcenter-sep-2022.github.io/df/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 29 Oct 2021 07:56:47 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=18115</guid>

					<description><![CDATA[案例一：显示所有存储信息 或者： 案例二：以方便人类阅读的方式显示存储信息 或者： 案例三：以 POSIX 的格式显示存储信息 或者： 案例四：显示存储的 inode 信息 或者： 案例五：只显示本地的存储信息 或者： 案例六：显示存储的格式 或者：]]></description>
										<content:encoded><![CDATA[
<h3 id="案例一-显示所有存储信息">案例一：显示所有存储信息</h3>



<pre class="wp-block-code"><code># df -a</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --all</code></pre>



<h3 id="案例二-以方便人类阅读的方式显示存储信息">案例二：以方便人类阅读的方式显示存储信息</h3>



<pre class="wp-block-code"><code># df -h</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --human-readable</code></pre>



<h3>案例三：以 POSIX 的格式显示存储信息</h3>



<pre class="wp-block-code"><code># df -P</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --portability</code></pre>



<h3 id="案例三-显示存储的-inode-信息"> 案例四：显示存储的 inode 信息</h3>



<pre class="wp-block-code"><code># df -i</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --inodes</code></pre>



<h3>案例五：只显示本地的存储信息</h3>



<pre class="wp-block-code"><code># df -l</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --local</code></pre>



<h3 id="案例三-显示存储的格式"> 案例六：显示存储的格式</h3>



<pre class="wp-block-code"><code># df -T</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># df --print-type</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 格式化特点</title>
		<link>https://eternalcenter-sep-2022.github.io/linux-formatting-features/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 19 Aug 2021 12:02:18 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=17520</guid>

					<description><![CDATA[内容一：格式化后会产生的分区 格式化会格式出 inode 区和 block 区 内容二：inode 区和 block 区的作用 inode 区默认一格大小是 512 个字节，存储哪一份数据存在了哪些 block 里以及数据的所属者、权限创建时间等 metadata 元数据block 区默认一格大小是 4k，只存储数据本身 内容三：Linux 文件格式的特点 ext3 和 ext4 的 inode 区每一格较小，而 xfs 的 inode 区每一格更大，可以存储更多种类，例如快照等 metadata 元数据]]></description>
										<content:encoded><![CDATA[
<h3>内容一：格式化后会产生的分区</h3>



<p>格式化会格式出 inode 区和 block 区</p>



<h3>内容二：inode 区和 block 区的作用</h3>



<p>inode 区默认一格大小是 512 个字节，存储哪一份数据存在了哪些 block 里以及数据的所属者、权限创建时间等 metadata 元数据<br>block 区默认一格大小是 4k，只存储数据本身</p>



<h3>内容三：Linux 文件格式的特点</h3>



<p>ext3 和 ext4 的 inode 区每一格较小，而 xfs 的 inode 区每一格更大，可以存储更多种类，例如快照等 metadata 元数据</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 fdisk （硬盘的分区和显示）</title>
		<link>https://eternalcenter-sep-2022.github.io/fdisk/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 22 Jul 2021 08:06:28 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=16921</guid>

					<description><![CDATA[内容一：给一个硬盘分区 （补充：这里以给 /dev/sda 硬盘分区为例，键入以上命令之后，可以根据提示进行分区操作） 内容二：显示已有分区情况]]></description>
										<content:encoded><![CDATA[
<h3 id="内容一-给一个硬盘分区">内容一：给一个硬盘分区</h3>



<pre class="wp-block-code"><code># fdisk /dev/sda</code></pre>



<p>（补充：这里以给 /dev/sda 硬盘分区为例，键入以上命令之后，可以根据提示进行分区操作）</p>



<h3 id="内容二-显示已有分区情况">内容二：显示已有分区情况</h3>



<pre class="wp-block-code"><code># fdisk -l</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux BIOS 和 EFI 的区分 （系统安装时启动分区种类的显示）</title>
		<link>https://eternalcenter-sep-2022.github.io/bios-efi/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 08:46:20 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=13591</guid>

					<description><![CDATA[内容一：判断 Linux 是 BIOS 还是 EFI 的方法 （补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS） 内容二：判断 Linux 是 BIOS 还是 EFI 的脚本]]></description>
										<content:encoded><![CDATA[
<h3 id="内容一-判断-linux-是-bios-还是-efi-的方法">内容一：判断 Linux 是 BIOS 还是 EFI 的方法</h3>



<pre class="wp-block-code"><code># ls -ld /sys/firmware/efi</code></pre>



<p>（补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS）</p>



<h3 id="内容二-判断-linux-是-bios-还是-efi-的脚本">内容二：判断 Linux 是 BIOS 还是 EFI 的脚本</h3>



<pre class="wp-block-code"><code># &#91; -d /sys/firmware/efi ] &amp;&amp; echo UEFI || echo BIOS</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 rm （删除目录或文件）</title>
		<link>https://eternalcenter-sep-2022.github.io/rm/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 08:31:42 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System File (系统文件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=13585</guid>

					<description><![CDATA[案例一：删除某一个文件 案例二：删除某一个目录以及目录里的所有文件 案例三：非交互式删除某一个目录以及目录里的所有文件 案例四：非交互式删除当前目录下的所有隐藏文件 案例五：非交互式删除所有特定后缀名称的文件 （补充：这里以非交互式删除所有以 txt 作为后缀名称的文件为例）]]></description>
										<content:encoded><![CDATA[
<h3>案例一：删除某一个文件</h3>



<pre class="wp-block-code"><code># rm &lt;file&gt;</code></pre>



<h3>案例二：删除某一个目录以及目录里的所有文件</h3>



<pre class="wp-block-code"><code># rm -r &lt;directory&gt;</code></pre>



<h3>案例三：非交互式删除某一个目录以及目录里的所有文件</h3>



<pre class="wp-block-code"><code># rm -rf &lt;directory&gt;</code></pre>



<h3>案例四：非交互式删除当前目录下的所有隐藏文件</h3>



<pre class="wp-block-code"><code># rm -rf .#*</code></pre>



<h3>案例五：非交互式删除所有特定后缀名称的文件</h3>



<pre class="wp-block-code"><code># rm -rf *txt</code></pre>



<p>（补充：这里以非交互式删除所有以 txt 作为后缀名称的文件为例）</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
