【CentOS】Linux 在线帮助文档命令:help、man 命令与文档汉化

目录

1、Linux 的命令行模式

2、help 命令

3、man 命令

4、man 命令输出文档汉化


        注:本文档使用 Linux 版本为 CentOS 7.9

[swadian@localhost ~]$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)

1、Linux 的命令行模式

        一般情况下,我们使用 Linux,都是通过特定的程序跟 Linux 系统进行沟通的,这个特定的程序就被称为壳程序(Shell),Linux 的壳程序就是 BASH。

        Linux 的命令行格式:

[swadian@localhost ~]$ command [-options] parameterl parameter2命令      选项       参数1       参数2

        上述命令详细说明如下:

  1. 一行命令中第一个输入的部分绝对是命令 (command ) 或可执行文件 (例如 shell 脚本),command 为命令的名称,例如变换工作目录的命令为 cd 等。
  2. 中扩号 [] 并不存在于实际的命令中,表示是可选的,而加入选项设置时,通常选项前会带 - 号,例如 -h;有时候会使用选项的完整全名,则选项前带有 -- 符号,例如 --help
  3. parameter1 parameter2 为依附在选项后面的参数,或是 command 的参数

        命令、选项、参数等这几个东西中间以空格来区分,不论空几格 shell 都视为一格,所以空格是很重要的特殊字符。

        Linux 系统中有非常多的命令,而且不同版本的 Linux 命令也稍有不同,那,这么多的命令都需要我们去死记硬背吗?

        答案是:当然不需要,我们只需要知道知道怎样使用联机文档就可以了。

2、help 命令

        首先,如果你知道一个命令,但是不清楚它的具体用法,你只要使用 [--help] 这个选项,就能够对该命令的用法有一个大致的理解,例如,下边是 date 这个命令的基本用法与选项参数的介绍:

[swadian@localhost ~]$ date --help
Usage: date [OPTION]... [+FORMAT]or:  date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.Mandatory arguments to long options are mandatory for short options too.-d, --date=STRING         display time described by STRING, not 'now'-f, --file=DATEFILE       like --date once for each line of DATEFILE-I[TIMESPEC], --iso-8601[=TIMESPEC]  output date/time in ISO 8601 format.TIMESPEC='date' for date only (the default),'hours', 'minutes', 'seconds', or 'ns' for dateand time to the indicated precision.-r, --reference=FILE      display the last modification time of FILE-R, --rfc-2822            output date and time in RFC 2822 format.Example: Mon, 07 Aug 2006 12:34:56 -0600--rfc-3339=TIMESPEC   output date and time in RFC 3339 format.TIMESPEC='date', 'seconds', or 'ns' fordate and time to the indicated precision.Date and time components are separated bya single space: 2006-08-07 12:34:56-06:00-s, --set=STRING          set time described by STRING-u, --utc, --universal    print or set Coordinated Universal Time (UTC)--help     display this help and exit--version  output version information and exitFORMAT controls the output.  Interpreted sequences are:%%   a literal %%a   locale's abbreviated weekday name (e.g., Sun)%A   locale's full weekday name (e.g., Sunday)%b   locale's abbreviated month name (e.g., Jan)%B   locale's full month name (e.g., January)%c   locale's date and time (e.g., Thu Mar  3 23:05:25 2005)%C   century; like %Y, except omit last two digits (e.g., 20)%d   day of month (e.g., 01)%D   date; same as %m/%d/%y%e   day of month, space padded; same as %_d%F   full date; same as %Y-%m-%d%g   last two digits of year of ISO week number (see %G)%G   year of ISO week number (see %V); normally useful only with %V%h   same as %b%H   hour (00..23)%I   hour (01..12)%j   day of year (001..366)%k   hour, space padded ( 0..23); same as %_H%l   hour, space padded ( 1..12); same as %_I%m   month (01..12)%M   minute (00..59)%n   a newline%N   nanoseconds (000000000..999999999)%p   locale's equivalent of either AM or PM; blank if not known%P   like %p, but lower case%r   locale's 12-hour clock time (e.g., 11:11:04 PM)%R   24-hour hour and minute; same as %H:%M%s   seconds since 1970-01-01 00:00:00 UTC%S   second (00..60)%t   a tab%T   time; same as %H:%M:%S%u   day of week (1..7); 1 is Monday%U   week number of year, with Sunday as first day of week (00..53)%V   ISO week number, with Monday as first day of week (01..53)%w   day of week (0..6); 0 is Sunday%W   week number of year, with Monday as first day of week (00..53)%x   locale's date representation (e.g., 12/31/99)%X   locale's time representation (e.g., 23:13:48)%y   last two digits of year (00..99)%Y   year%z   +hhmm numeric time zone (e.g., -0400)%:z  +hh:mm numeric time zone (e.g., -04:00)%::z  +hh:mm:ss numeric time zone (e.g., -04:00:00)%:::z  numeric time zone with : to necessary precision (e.g., -04, +05:30)%Z   alphabetic time zone abbreviation (e.g., EDT)By default, date pads numeric fields with zeroes.
The following optional flags may follow '%':-  (hyphen) do not pad the field_  (underscore) pad with spaces0  (zero) pad with zeros^  use upper case if possible#  use opposite case if possibleAfter any flags comes an optional field width, as a decimal number;
then an optional modifier, which is either
E to use the locale's alternate representations if available, or
O to use the locale's alternate numeric symbols if available.Examples:
Convert seconds since the epoch (1970-01-01 UTC) to a date$ date --date='@2147483647'Show the time on the west coast of the US (use tzselect(1) to find TZ)$ TZ='America/Los_Angeles' dateShow the local time for 9AM next Friday on the west coast of the US$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'date invocation'

        在上边的显示文档中,首先一开始是执行命令的语法 (Usage)

Usage: date [OPTION]... [+FORMAT]   #1、基本语法or:  date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]  #2、设置事件的语法
Display the current time in the given FORMAT, or set the system date.
#显示指定格式的当前时间,或者设置系统日期。

        Usage 中说明,这个 date 有两种基本语法,一种是直接执行并且取得日期返回值,且可以 +FORAMAT 的方式来显示。至于另一种方式,则是加上 MMDDhhmmCCYY 的方式来设置日期时间,它的格式是 [月月日日时时分分公元年] 的格式。

        再往下看,会列举一些主要的选项,例如 -d,-f,-r 的意义, +FORMAT 的用法等:

# 主要的选项说明
Mandatory arguments to long options are mandatory for short options too.-d, --date=STRING         display time described by STRING, not 'now'-f, --file=DATEFILE       like --date once for each line of DATEFILE-I[TIMESPEC], --iso-8601[=TIMESPEC]  output date/time in ISO 8601 format.TIMESPEC='date' for date only (the default),'hours', 'minutes', 'seconds', or 'ns' for dateand time to the indicated precision.-r, --reference=FILE      display the last modification time of FILE
#省略.....#下面则是重要的格式 (FORMAT)的主要项目
FORMAT controls the output.  Interpreted sequences are:%%   a literal %%a   locale's abbreviated weekday name (e.g., Sun)%A   locale's full weekday name (e.g., Sunday)
#省略.....

        然后再接下来,就是该命令的几个使用示例

# 使用示例
Examples:
Convert seconds since the epoch (1970-01-01 UTC) to a date$ date --date='@2147483647'Show the time on the west coast of the US (use tzselect(1) to find TZ)$ TZ='America/Los_Angeles' date
#省略.....

        基本上如果是命令,那么通过这个简单的 [--help] 就可以很快速地取得你所需要的选项、参数的说明。这里说明一下,尽管我们不需要硬背命令参数,但是常用的命令还是得记忆一下,而选项就通过 [--help] 来快速查询即可。

        但是,如果你要使用的是从来没有用过得命令,或是你要查询的根本就不是命令,而是文件的格式时,那又该怎么办呢?那么,你就需要使用 man page 命令了。

3、man 命令

        这个 man 是 manual (操作说明) 的简写。该命令提供比 help 更加详细的文档说明。以下是执行:[man date] 的示例:

[swadian@localhost ~]$ man date
DATE(1)                                                                User Commands                                                               DATE(1)NAME #简短的命令,数据名称说明date - print or set the system date and timeSYNOPSIS #简短的命令语法简介date [OPTION]... [+FORMAT]date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]DESCRIPTION #较为完整的说明(重点)Display the current time in the given FORMAT, or set the system date.Mandatory arguments to long options are mandatory for short options too.-d, --date=STRINGdisplay time described by STRING, not 'now'-f, --file=DATEFILElike --date once for each line of DATEFILE-I[TIMESPEC], --iso-8601[=TIMESPEC]output  date/time in ISO 8601 format.  TIMESPEC='date' for date only (the default), 'hours', 'minutes', 'seconds', or 'ns' for date and timeto the indicated precision.-r, --reference=FILEdisplay the last modification time of FILE-R, --rfc-2822output date and time in RFC 2822 format.  Example: Mon, 07 Aug 2006 12:34:56 -0600--rfc-3339=TIMESPECoutput date and time in RFC 3339 format.  TIMESPEC='date', 'seconds', or 'ns' for date and time to the indicated precision.  Date  and  timecomponents are separated by a single space: 2006-08-07 12:34:56-06:00-s, --set=STRINGset time described by STRING-u, --utc, --universalprint or set Coordinated Universal Time (UTC)--help display this help and exit--versionoutput version information and exitFORMAT controls the output.  Interpreted sequences are:%%     a literal %%a     locale's abbreviated weekday name (e.g., Sun)%A     locale's full weekday name (e.g., Sunday)%b     locale's abbreviated month name (e.g., Jan)%B     locale's full month name (e.g., January)%c     locale's date and time (e.g., Thu Mar  3 23:05:25 2005)%C     century; like %Y, except omit last two digits (e.g., 20)%d     day of month (e.g., 01)%D     date; same as %m/%d/%y%e     day of month, space padded; same as %_d%F     full date; same as %Y-%m-%d%g     last two digits of year of ISO week number (see %G)%G     year of ISO week number (see %V); normally useful only with %V%h     same as %b%H     hour (00..23)%I     hour (01..12)%j     day of year (001..366)%k     hour, space padded ( 0..23); same as %_H%l     hour, space padded ( 1..12); same as %_I%m     month (01..12)%M     minute (00..59)%n     a newline%N     nanoseconds (000000000..999999999)%p     locale's equivalent of either AM or PM; blank if not known%P     like %p, but lower case%r     locale's 12-hour clock time (e.g., 11:11:04 PM)%R     24-hour hour and minute; same as %H:%M%s     seconds since 1970-01-01 00:00:00 UTC%S     second (00..60)%t     a tab%T     time; same as %H:%M:%S%u     day of week (1..7); 1 is Monday%U     week number of year, with Sunday as first day of week (00..53)%V     ISO week number, with Monday as first day of week (01..53)%w     day of week (0..6); 0 is Sunday%W     week number of year, with Monday as first day of week (00..53)%x     locale's date representation (e.g., 12/31/99)%X     locale's time representation (e.g., 23:13:48)%y     last two digits of year (00..99)%Y     year%z     +hhmm numeric time zone (e.g., -0400)%:z    +hh:mm numeric time zone (e.g., -04:00)%::z   +hh:mm:ss numeric time zone (e.g., -04:00:00)%:::z  numeric time zone with : to necessary precision (e.g., -04, +05:30)%Z     alphabetic time zone abbreviation (e.g., EDT)By default, date pads numeric fields with zeroes.  The following optional flags may follow '%':-      (hyphen) do not pad the field_      (underscore) pad with spaces0      (zero) pad with zeros^      use upper case if possible#      use opposite case if possibleAfter any flags comes an optional field width, as a decimal number; then an optional modifier, which is either E to use the locale's alternate rep‐resentations if available, or O to use the locale's alternate numeric symbols if available.ENVIRONMENTTZ     Specifies the timezone, unless overridden by command line parameters.  If neither is specified, the setting from /etc/localtime is used.EXAMPLES #参考范例Convert seconds since the epoch (1970-01-01 UTC) to a date$ date --date='@2147483647'Show the time on the west coast of the US (use tzselect(1) to find TZ)$ TZ='America/Los_Angeles' dateShow the local time for 9AM next Friday on the west coast of the US$ date --date='TZ="America/Los_Angeles" 09:00 next Fri'GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report date translation bugs to <http://translationproject.org/team/>DATE STRINGThe --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or  "2004-02-29  16:21:42"  or  even"next  Thursday".  A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, andnumbers.  An empty string indicates the beginning of the day.  The date string format is more complex than is easily documented here but  is  fullydescribed in the info documentation.AUTHORWritten by David MacKenzie.COPYRIGHTCopyright © 2013 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it.  There is NO WARRANTY, to the extent permitted by law.SEE ALSOThe full documentation for date is maintained as a Texinfo manual.  If the info and date programs are properly installed at your site, the commandinfo coreutils 'date invocation'should give you access to the complete manual.

        首先,在上个表格的第一行,你可以看到的是:[DATE(1)]DATE 我们知道是命令的名称,那么 (1) 代表什么?它代表的是“一般用户可使用的命令”的意思。以下是常见的几个数字的意义:

        注:上表中的 1、5、8 这三个号码特别重要,最好是将这三个数字所代表的意义背下来。

        接下来,就是 man page 的内容,基本上 man page 的内容大致分成下面这几个部分:

        有些时候,你只记得该命令的部分关键词,但是偏偏忘记了该命令的完整名称,这个时候你要如何查出来你所想要知道的 man page 呢?

        man -f 命令:

        使用 -f 这个选项就可以取得更多与命令相关的信息,比如,执行 man -f man

[swadian@localhost ~]$ man -f man
man (1)              - an interface to the on-line reference manuals
man (1p)             - display system documentation
man (7)              - macros to format man pages

        上边内容中,第三行的 [man(7)] 表示有个 man(7) 的说明文件存在,但是也有个 man(1) 存在。那当我们执行 [man man] 的时候,到底是指向哪一个说明文件?其实,你可以指定不同的文件,举例来说,上表当中的两个 man 你可以这样将它的文件显示出来:

[swadian@localhost ~]$ man 1 man #展示man(1)的说明文件
[swadian@localhost ~]$ man 7 man #展示man(7)的说明文件

        当使用 [ man -f ] 命令] 时,man 只会找数据中的左边那个命令的完整名称,有一点不同都不行。

        但如果我想要找的是关键词呢?

        man -k 命令:

        比如,执行 man -k grep 命令,你会发现具有 'grep ' 关键词的命令都被打印出来了:

[swadian@localhost ~]$ man -k grep
bzgrep (1)           - search possibly bzip2 compressed files for a regular expression
egrep (1)            - print lines matching a pattern
fgrep (1)            - print lines matching a pattern
grep (1)             - print lines matching a pattern
grep (1p)            - search a file for a pattern
#省略...

        事实上,还有两个命令与 man page 有关,而这两个命令是 man 的简略写法,这两个命令如下:

[swadian@localhost ~]$ whatis grep  #相当于man -f
[swadian@localhost ~]$ apropos grep #相当于man -k

4、man 命令输出文档汉化

        一般来说,我们看 man 命令的输出文档默认都是英语文档,但对于初学者来说,可能会有些不习惯,那么,此时使用中文文档就显得简单直观多了。

        (1)首先,我们要从网上下载 man 的汉化包:

[root@localhost ~]# wget https://src.fedoraproject.org/repo/pkgs/man-pages-zh-CN/manpages-zh-1.5.1.tar.gz/13275fd039de8788b15151c896150bc4/manpages-zh-1.5.1.tar.gz

        (2)下载完成后,解压 man 汉化包:

[root@localhost ~]# tar -xvf manpages-zh-1.5.1.tar.gz

        (3)然后,进如解压后的目录,在安装之前进行一些配置:

[root@localhost ~]# cd manpages-zh-1.5.1/
[root@localhost manpages-zh-1.5.1]# ./configure --disable-zhtw  --prefix=/usr/local/zhman
  • --disable-zhtw:表示禁用繁体中文支持。软件构建时,相关的繁体中文的功能将被禁用。
  • --prefix=/usr/local/zhman:指定软件安装的根目录。在这个例子中,软件将被安装到 /usr/local/zhman 目录下。prefix 选项通常用于指定软件的安装路径。

        (4)执行编译:

[root@localhost manpages-zh-1.5.1]# make && make install

        make make install 是用于构建和安装软件的两个命令。

        make 命令用于调用 Makefile 文件,执行其中定义的构建规则,编译源代码并生成可执行文件,一旦通过 make 构建成功,make install 用于将生成的可执行文件和相关文件安装到系统中。

        (5)为了防止 man 中文版和英文版冲突,给 man 中文版起一个别名,并重新加载配置:

[root@localhost manpages-zh-1.5.1]# echo "alias cman='man -M /usr/local/zhman/share/man/zh_CN' " >>.bash_profile
[root@localhost manpages-zh-1.5.1]# source .bash_profile

        接下来,就可以使用 cman 命令实现 man 的功能了:

        如上我们就对 man 命令进行了汉化。

        至此,全文结束。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

喜讯 | 华院计算摘得“2023大数据产业年度创新技术突破”奖

2024年1月17日&#xff0c; 由数据猿和上海大数据联盟主办&#xff0c;上海市经济和信息化委员会、上海市科学技术委员会指导的“第六届金猿季&魔方论坛——大数据产业发展论坛”在上海市四行仓库举行。论坛以“小趋势大未来”为主题&#xff0c;围绕大数据产业的各个领域展…

MySQL-SQL-DQL

DQL-介绍 DQL-语法 基本查询 1、查询多个字段 2、设置别名 3、去除重复记录 条件查询 1、语法 2、条件 聚合函数 1、介绍 2、常见的聚合函数 3、语法 分组查询 1、语法 2、where与having区别 排序查询 1、语法 2、排序方式 分页查询 1、语法 DQL-执行顺序

ubuntu 安装protobuf

apt 安装 sudo apt install protobuf-compiler 编译安装 – 方式1 资料链接&#xff1a;ubuntu环境 安装ncnn_ubuntu ncnn_jbyyy、的博客-CSDN博客 git clone https://github.com/google/protobuf.git cd protobuf git submodule update --init --recursive ./autogen.sh …

关于php8的数据类型转换

目录 1、数据类型介绍 1.1 简单数据类型&#xff1a; 1.2 复合数据类型&#xff1a; 1.3 特殊数据类型&#xff1a; 2、数据类型转换 2.1 自动转换&#xff1a; 2.2 强制&#xff08;手动&#xff09;转换&#xff1a; 3、验证数据类型途径 &#xff08;1&#xff09;var…

2024年第3周农产品价格监测报告

一、摘要 农产品价格监测主要涉及对畜禽类产品、水产品、蔬菜类产品、水果类产品的价格&#xff0c;以周为单位&#xff0c;进行变化情况的数据监测。其中&#xff0c;蔬菜类产品共8种&#xff0c;分别为菜花、韭菜、豆角、西红柿、胡萝卜、土豆、大葱、葱头。 本周重点监测的…

Element组件完整引入、按需引入、样式修改(全局、局部)、简单安装less以及npm命令证书过期等

目录 一、npm 安装二、完整引入三、按需引入四、样式修改1.按需加载的全局样式修改2. 局部样式修改1. 在 css 预处理器如 less scss 等直接使用::v-deep2. 只能用在原生 CSS 语法中:/deep/ 或者 >>> 五、 拓展&#xff1a;npm 安装less报错&#xff0c;提示证书过期六…

斯拉、理想等车企大幅降价,新一轮大洗牌正在进行中 |百能云芯

2024年刚开年&#xff0c;各大车企就先后抛出降价大礼包&#xff01;1月1日&#xff0c;特斯拉率先宣布调价&#xff0c;推出Model 3后驱现车保险补贴及低息金融政策&#xff0c;总优惠幅度高达2.2万元。正当大家还没有完全消化完特斯拉的调价信息后&#xff0c;理想汽车也宣布…

Unity中URP下的 额外灯 逐像素光 和 逐顶点光

文章目录 前言一、额外灯 的 逐像素灯 和 逐顶点灯1、存在额外灯的逐像素灯2、存在额外灯的逐顶点灯 二、测试这两个宏的作用1、额外灯的逐像素灯2、额外灯的逐顶点灯 前言 在之前的文章中&#xff0c;我们了解了 主光相关的反射计算。 Unity中URP下的SimpleLit的 Lambert漫反…

有效的数独[中等]

优质博文&#xff1a;IT-BLOG-CN 一、题目 请你判断一个9 x 9的数独是否有效。只需要根据以下规则&#xff0c;验证已经填入的数字是否有效即可。 数字 1-9 在每一行只能出现一次。 数字 1-9 在每一列只能出现一次。 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一…

Elasticsearch:介绍 kNN query,这是进行 kNN 搜索的专家方法

作者&#xff1a;来自 Elastic Mayya Sharipova, Benjamin Trent 当前状况&#xff1a;kNN 搜索作为顶层部分 Elasticsearch 中的 kNN 搜索被组织为搜索请求的顶层&#xff08;top level&#xff09;部分。 我们这样设计是为了&#xff1a; 无论分片数量多少&#xff0c;它总…

实现纯Web语音视频聊天和桌面分享(附源码,PC端+移动端)

在网页里实现文字聊天是比较容易的&#xff0c;但若要实现视频聊天&#xff0c;就比较麻烦了。本文将实现一个纯Web版的视频聊天和桌面分享的Demo&#xff0c;可直接在浏览器中运行&#xff0c;不需要安装任何插件。 一. 主要功能及支持平台 1.本Demo的主要功能有 &#xff…

【书生·浦语】大模型实战营——第六次作业

使用OpenCompass 评测 InterLM2-chat-chat-7B 模型在C-Eval数据集上的性能 环境配置 1. 创建虚拟环境 conda create --name opencompass --clone/root/share/conda_envs/internlm-base source activate opencompass git clone https://github.com/open-compass/opencompass cd…

【PWN · 格式化字符串|劫持fini_array|劫持got表】[CISCN 2019西南]PWN1

格式化字符串的经典利用&#xff1a;劫持got表。但是遇到漏洞点只能执行一次的情况&#xff0c;该怎么办&#xff1f; 前言 如果存在格式化字符串&#xff0c;保护机制开的不健全&#xff0c;通常可以劫持got表&#xff0c;构造后门函数。然而&#xff0c;如果不存在循环、栈溢…

gradle打包分离依赖jar

正常打包的jar是包含项目所依赖的jar包资源&#xff0c;而且大多数场景下的依赖资源是不会频繁的变更的&#xff0c;所以实际把项目自身jar和其所依赖的资源分离可以实现jar包瘦身&#xff0c;减小上传的jar包总大小&#xff0c;能实现加速部署的效果 一 原本结构 二 配置buil…

机器学习_正则化、欠拟合和过拟合

文章目录 正则化欠拟合和过拟合正则化参数 正则化 机器学习中的正则化是在损失函数里面加惩罚项&#xff0c;增加建模的模糊性&#xff0c;从而把捕捉到的趋势从局部细微趋势&#xff0c;调整到整体大概趋势。虽然一定程度上地放宽了建模要求&#xff0c;但是能有效防止过拟合…

用通俗易懂的方式讲解:使用 MongoDB 和 Langchain 构建生成型AI聊天机器人

想象一下&#xff1a;你收到了你梦寐以求的礼物&#xff1a;一台非凡的时光机&#xff0c;可以将你带到任何地方、任何时候。 你只有10分钟让它运行&#xff0c;否则它将消失。你拥有一份2000页的PDF&#xff0c;详细介绍了关于这台时光机的一切&#xff1a;它的历史、创造者、…

【计算机网络】应用层——HTTP 协议(一)

个人主页&#xff1a;兜里有颗棉花糖 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 兜里有颗棉花糖 原创 收录于专栏【网络编程】 本专栏旨在分享学习计算机网络的一点学习心得&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 一、什么是 HTTP 协…

假期刷题打卡--Day10

一、C语言刷题 预处理命令模块的题目就只有几个&#xff0c;下面开始选择结构这个模块的题目。 1、MT1112中庸之道 请编写一个简单程序&#xff0c;输入3个整数&#xff0c;比较他们的大小&#xff0c;输出中间的那个数 格式 输入格式&#xff1a; 输入整型&#xff0c;空…

linux源码编译安装llvm

目录 1 建立文件夹llvm 2 下载源码到llvm文件夹 3 解压上述文件 4 将解压后的3个文件夹改名&#xff0c;并移动到llvm-9.0.0.src中&#xff1a; 5 在llvm文件夹内建立build文件夹&#xff0c;并进入该文件夹&#xff1a; 6 执行cmake命令 7 make 8 安装 9 安装成功后…

C++中特殊类的设计与单例模式的简易实现

设计一个只能在堆上创建对象的类 对于这种特殊类的设计我们一般都是优先考虑私有构造函数。然后对于一些特殊要求就直接通过静态成员函数的实现来完成。 class A//构造函数私有&#xff08;也可以析构函数私有&#xff09; { public:static A* creat(){return new A;} privat…