Linux shell编程学习笔记38:history命令

news2025/7/3 6:48:43

0 前言

使用DOS的朋友,都知道可以在命令行提示符中使用上下光标键来浏览最近执行过的命令,这是基于DOS提供的DosKey命令。

而在Unix和Linux的shell中,我们同样可以使用上下光标键来浏览最近执行过的命令历史纪录(history),这是因为有history命令。

bash可以保存的过去曾经执行过的命令。当某个用户登录到shell中,会读取该用户家目录中的~/.bash_history文件,并将历史命令列表保存到内存中。当用户退出当前shell时,会将内存中的历史命令列表覆盖至~/.bash_history文件。

 1  history命令的功能、格式和退出状态

我们可以使用 help history命令查看 history命令的帮助信息。

purpleEndurer @ bash ~ $help history
history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
    Display or manipulate the history list.
    
    Display the history list with line numbers, prefixing each modified
    entry with a `*'.  An argument of N lists only the last N entries.
    
    Options:
      -c        clear the history list by deleting all of the entries
      -d offset delete the history entry at offset OFFSET.
    
      -a        append history lines from this session to the history file
      -n        read all history lines not already read from the history file
      -r        read the history file and append the contents to the history
        list
      -w        write the current history to the history file 
        and append them to the history list
    
      -p        perform history expansion on each ARG and display the result
        without storing it in the history list
      -s        append the ARGs to the history list as a single entry
    
    If FILENAME is given, it is used as the history file.  Otherwise,
    if $HISTFILE has a value, that is used, else ~/.bash_history.
    
    If the $HISTTIMEFORMAT variable is set and not null, its value is used
    as a format string for strftime(3) to print the time stamp associated
    with each displayed history entry.  No time stamps are printed otherwise.
    
    Exit Status:
    Returns success unless an invalid option is given or an error occurs.
purpleEndurer @ bash ~ $

1.1 history命令的功能

history命令是一个内部命令,可以显示或操纵命令历史列表。

purpleEndurer @ bash ~ $type history
history is a shell builtin
purpleEndurer @ bash ~ $

1.2 history命令的格式

history [-c] [-d 偏移量] [历史记录数]

history -anrw [文件名]

history -ps 参数 [参数...]

选项功能备注
-a将当前会话的命令行历史追加到历史文件~/.bash_history中append
-c删除所有条目从而清空历史列表内容。clear
-d 偏移量 从指定位置删除历史列表内容。delete
历史记录数显示指定数量的历史命令纪录,应为正整数number
-n从历史文件中读取所有未被读取的行not
-p 参数对每一个指定参数展开历史并显示结果而不存储到历史列表中perform
-r读取历史文件并将内容追加到历史列表中read
-s 命令以单条记录将 指定命令 追加到历史列表中。如果指定了 文件名,则它将被作为历史文件。否则如果 $HISTFILE 变量有值的话使用之,不然使用 ~/.bash_history 文件。如果 $HISTTIMEFORMAT 变量被设定并且不为空,它的值会被用于 strftime(3) 的格式字符串来打印与每一个显示的历史条目想关联的时间戳,否则不打印时间戳。single
-w [文件]将当前历史写入到历史文件中,并追加到历史列表中write

1.3退出状态

返回成功,除非使用了无效的选项或者发生错误。


2 命令应用实例

2.1 history:显示命令历史列表

prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  history
prupleEndurer @ bash ~ $ 

 

 2.2 history -a:将当前会话的命令行历史追加到历史文件~/.bash_history中

prupleEndurer @ bash ~ $ cat ~/.bash_history
PS1="prupleEndurer @ bash \w $ "
history -2
echo $?
history
history -r
history
history
history -a
prupleEndurer @ bash ~ $ history -a
prupleEndurer @ bash ~ $ cat ~/.bash_history
PS1="prupleEndurer @ bash \w $ "
history -2
echo $?
history
history -r
history
history
history -a
history -n
ls ~/.bash_history
cat ~/.bash_history
cat ~/.bash_history -a
cls
clear
cat ~/.bash_history -a
cls
clear
cat ~/.bash_history
history -a
prupleEndurer @ bash ~ $ 

我们先执行cat ~/.bash_history 命令查看文件~/.bash_history的内容

然后执行history -a 命令将当前会话的命令行历史追加到历史文件~/.bash_history中

接着再次执行cat ~/.bash_history 命令查看文件~/.bash_history的内容

可以看到文件~/.bash_history中确实增加了下面这些命令行:

history -n
ls ~/.bash_history
cat ~/.bash_history
cat ~/.bash_history -a
cls
clear
cat ~/.bash_history -a
cls
clear
cat ~/.bash_history
history -a

2.3 history -c:删除所有条目从而清空历史列表

prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  history 0
    3  echo $?
    4  history
prupleEndurer @ bash ~ $ history -c
prupleEndurer @ bash ~ $ history
    1  history
prupleEndurer @ bash ~ $ 

我们先执行history 命令查看当前命令历史列表,内容如下:

    1  PS1="prupleEndurer @ bash \w $ "
    2  history 0
    3  echo $?
    4  history

然后执行history -c 命令将当前会话的命令行历史列表清空

接着再次执行history 命令查看当前命令历史列表,这时历史列表只有我们这次所输入的的命令:

    1  history

之前的命令历史列表都被清空了。

2.4 history -d 偏移量:从指定位置删除历史列表内容

prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  history
    3  history 0
    4  echo $?
    5  history 3
    6  history
prupleEndurer @ bash ~ $ history -d 2
prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  history 0
    3  echo $?
    4  history 3
    5  history
    6  history -d 2
    7  history
prupleEndurer @ bash ~ $ 

我们先执行history 命令查看当前命令历史列表,内容如下:

    1  PS1="prupleEndurer @ bash \w $ "
    2  history
    3  history 0
    4  echo $?
    5  history 3
    6  history

然后执行history -d 2 命令将第2行命令删除

接着再次执行history 命令查看当前命令历史列表,内容如下:

    1  PS1="prupleEndurer @ bash \w $ "
    2  history 0
    3  echo $?
    4  history 3
    5  history
    6  history -d 2
    7  history

可以看到命令历史列表中之前的第2条纪录:

    2  history

被删除了。 

如果我指定的偏移量是负数,例如-2,命令将出错,退出状态码为1:

prupleEndurer @ bash ~ $ history -d -2
bash: history: -2: history position out of range
prupleEndurer @ bash ~ $ echo $?
1
prupleEndurer @ bash ~ $ 

2.5 history 正整数:显示指定数量的历史命令纪录

 prupleEndurer @ bash ~/Code $ history
    1  history
prupleEndurer @ bash ~/Code $ history 1
    2  history 1
prupleEndurer @ bash ~/Code $ history 0
prupleEndurer @ bash ~/Code $ history 2
    3  history 0
    4  history 2
prupleEndurer @ bash ~/Code $ history
    1  history
    2  history 1
    3  history 0
    4  history 2
    5  history
prupleEndurer @ bash ~/Code $ 

如果我们指定的是负数,将提示出错,命令退出值为2。

prupleEndurer @ bash ~ $ history -2
bash: history: -2: invalid option
history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]prupleEndurer @ bash ~ $ echo $?
2

2.6 history -r:读取历史文件并将内容追加到历史列表中

prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  cat ~/.bash_history
    3  set | grep  $HISTFILE
    4  cat /home/csdn/.bash_history
    5  history -w
    6  cat /home/csdn/.bash_history
    7  history -w c.log
    8  cat c.log
    9  history
prupleEndurer @ bash ~ $ history -r
prupleEndurer @ bash ~ $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  cat ~/.bash_history
    3  set | grep  $HISTFILE
    4  cat /home/csdn/.bash_history
    5  history -w
    6  cat /home/csdn/.bash_history
    7  history -w c.log
    8  cat c.log
    9  history
   10  history -r
   11  PS1="prupleEndurer @ bash \w $ "
   12  cat ~/.bash_history
   13  set | grep  $HISTFILE
   14  cat /home/csdn/.bash_history
   15  history -w
   16  history
prupleEndurer @ bash ~ $ cat /home/csdn/.bash_history
PS1="prupleEndurer @ bash \w $ "
cat ~/.bash_history
set | grep  $HISTFILE
cat /home/csdn/.bash_history
history -w
prupleEndurer @ bash ~ $ 

我们先执行history 命令查看当前命令历史列表共有9条,内容如下:

    1  PS1="prupleEndurer @ bash \w $ "
    2  cat ~/.bash_history
    3  set | grep  $HISTFILE
    4  cat /home/csdn/.bash_history
    5  history -w
    6  cat /home/csdn/.bash_history
    7  history -w c.log
    8  cat c.log
    9  history

然后执行history -r 命令读取历史文件并将内容追加到历史列表中

接着再次执行history 命令查看当前命令历史列表,共有16条,内容如下:

    1  PS1="prupleEndurer @ bash \w $ "
    2  cat ~/.bash_history
    3  set | grep  $HISTFILE
    4  cat /home/csdn/.bash_history
    5  history -w
    6  cat /home/csdn/.bash_history
    7  history -w c.log
    8  cat c.log
    9  history
   10  history -r
   11  PS1="prupleEndurer @ bash \w $ "
   12  cat ~/.bash_history
   13  set | grep  $HISTFILE
   14  cat /home/csdn/.bash_history
   15  history -w
   16  history

我们用命令 cat /home/csdn/.bash_history 查看历史文件的内容:

PS1="prupleEndurer @ bash \w $ "
cat ~/.bash_history
set | grep  $HISTFILE
cat /home/csdn/.bash_history
history -w

可以看到,当前命令历史列表中的第10条-15条记录是从历史文件添加进来的。

2.7 history -s 命令 :将 指定命令 追加到历史列表

prupleEndurer @ bash ~/Code $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  ls
    3  cd Code
    4  pwd
    5  history
    6  pwd
    7  pwd
    8  pwd
    9  set | grep hist
   10  set | grep HIST
   11  export | grep HIST
   12  export
   13  history
prupleEndurer @ bash ~/Code $ history -s abcd
prupleEndurer @ bash ~/Code $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  ls
    3  cd Code
    4  pwd
    5  history
    6  pwd
    7  pwd
    8  pwd
    9  set | grep hist
   10  set | grep HIST
   11  export | grep HIST
   12  export
   13  history
   14  abcd
   15  history
prupleEndurer @ bash ~/Code $

在上面的实例中, 我们执行命令 history -s abcd 将  abcd 加入到命令历史列表中。

2.8 history -w [文件]:将当前历史写入到历史文件中,并追加到历史列表中

 

2.8.1  将当前历史写入到默认历史文件中

系统默认历史文件说明符由环境变量 HISTFILE 指定。

prupleEndurer @ bash ~ $ set | grep  $HISTFILE
HISTFILE=/home/csdn/.bash_history
_=/home/csdn/.bash_history
prupleEndurer @ bash ~ $ cat /home/csdn/.bash_history
cat: /home/csdn/.bash_history: No such file or directory
prupleEndurer @ bash ~ $ history -w
prupleEndurer @ bash ~ $ cat /home/csdn/.bash_history
PS1="prupleEndurer @ bash \w $ "
cat ~/.bash_history
set | grep  $HISTFILE
cat /home/csdn/.bash_history
history -w
prupleEndurer @ bash ~ $ 

 

我们先执行 set | grep  $HISTFILE 命令 查询环境变量 HISTFILE 的值为:/home/csdn/.bash_history。

然后我们执行  cat /home/csdn/.bash_history 命令查看 /home/csdn/.bash_history 的内容,结果这个文件不存在。

接着我们执行 history -w  命令将命令行历史记录 保存到 /home/csdn/.bash_history。

最后我们再次执行 cat /home/csdn/.bash_history 命令查看 /home/csdn/.bash_history 的内容,这次文件不仅存在,而且文件内容就是我们之前输入的命令。

 

2.8.2  将当前历史写入到指定文件中

我们将 命令行历史记录 保存到 到当前目录下的文件 c.log中。

prupleEndurer @ bash ~ $ history -w c.log
prupleEndurer @ bash ~ $ cat c.log
PS1="prupleEndurer @ bash \w $ "
cat ~/.bash_history
set | grep  $HISTFILE
cat /home/csdn/.bash_history
history -w
cat /home/csdn/.bash_history
history -w c.log
prupleEndurer @ bash ~ $ 

  

首先,我们执行命令  history -w c.log   将 命令行历史记录 保存到 到当前目录下的文件 c.log中。

然后,我们执行命令  cat c.log   查看文件 c.log 的内容。

2.9 !:重复执行命令

2.9.1 !! 或 !-1:重复执行上一条命令

prupleEndurer @ bash ~/Code $ pwd
/home/csdn/Code
prupleEndurer @ bash ~/Code $ !!
pwd
/home/csdn/Code
prupleEndurer @ bash ~/Code $ !-1
pwd
/home/csdn/Code
prupleEndurer @ bash ~/Code $ 

 

我们执行命令!! 或 !-1 ,均会重复执行上一条命令pwd

除了以上两种方法,还有两种方法 :

  • 使用方向键↑选中命令,按↑↓调整,并回车执行
  • 按Ctrl + p,调出命令,并回车执行

 

 2.9.2 !命令历史列表列号 :重复执行历史列表中指定行的命令

prupleEndurer @ bash ~ $ ls
Code
prupleEndurer @ bash ~ $ ls Code
prupleEndurer @ bash ~ $ cd Code
prupleEndurer @ bash ~/Code $ ls
prupleEndurer @ bash ~/Code $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  ls
    3  ls Code
    4  cd Code
    5  ls
    6  history
prupleEndurer @ bash ~/Code $ !2
ls
prupleEndurer @ bash ~/Code $ ! 2
bash: 2: command not found

在上面的实例中,命令 !2 会执行命令历史列表中的 第2条命令 ls

由于 当前目录 下没有内容,所以ls命令没有显示。

如果 我们输入的命令是 ! 2,就会报错。

注意:

  • ! 与 命令历史列表列号 之间不能有空格。
  • 命令历史列表列号如果为正整数,则从头往下数;如果为负整数,则从下往上倒数,例如!-1执行的就是命令列表中最后一条命令

如果我们指定的命令历史列表列号 不在 命令历史列表实际列数中,会怎么样呢?

prupleEndurer @ bash ~/Code $ !0
bash: !0: event not found
prupleEndurer @ bash ~/Code $ echo $?
0
prupleEndurer @ bash ~/Code $ !100
bash: !100: event not found
prupleEndurer @ bash ~/Code $ echo $?
0
prupleEndurer @ bash ~/Code $ 

我们执行命令 !0 和 !100,系统都会提示:event not found

而命令返回值均为0。

 2.9.3 !字符串 :重复执行历史列表中以指定字符串开头的命令

prupleEndurer @ bash ~/Code $ history
    1  PS1="prupleEndurer @ bash \w $ "
    2  ls
    3  ls Code
    4  cd Code
    5  ls
    6  history
    7  ls
    8  ! 2
    9  cd Code
   10  ehco $?
   11  echo $?
   12  echo $?
   13  echo $?
   14  echo $?
   15  echo $?
   16  history
prupleEndurer @ bash ~/Code $ !cd
cd Code
bash: cd: Code: No such file or directory
prupleEndurer @ bash ~/Code $ ! cd
prupleEndurer @ bash ~ $ !ls
ls
Code
prupleEndurer @ bash ~ $ !ls Cod
ls Cod
ls: cannot access Cod: No such file or directory
prupleEndurer @ bash ~ $ echo $?
2
prupleEndurer @ bash ~ $ 

我们行执行命令 history 查看当前命令历史列表

然后先后执行 了 !cd! cd!ls !ls Cod 命令。从执行情况看,要注意两点:

  1. ! 和 字符串 之间不能有空格
  2. 如果命令历史列表中不包括指定字符串的命令,系统会直接执行字符串,比如 !ls Cod

 

2.10 其它使用技巧

网上介绍的一些使用技巧,大家可以试试。

2.10.1  重新执行或查看命令历史中的命令

  • !:0 将前一条命令去除参数再执行
  • Ctrl + n显示当前历史中的下一条命令,但不执行
  • Ctrl + j执行当前命令
  • !?string 重复前一个包含string字符串的命令
  • !string:p   仅打印命令历史,而不执行
  • !$:p 打印输出!$(上一条命令的最后一个参数)的内容
  • !*:p 打印输出!*(上一条命令的所有参数)的内容
  • ^string 删除上一条命令中的第一个string
  • ^string1^string2将上一条命令中的第一个string1替换为string2
  • !:gs/string1/srting2 将上一条命令中所有的string1都替换为string2

2.10.2 使用(reverse-i-search)模式

Crtl + r:在命令历史中搜索命令

Crtl + g:从历史搜索模式退出

 

2.10.3 使用命令历史记录中的参数

  •  重新调用前一个命令中最后一个参数

     有3种方法:

  1. !$
  2. Esc . (点击Esc键后松开,然后点击.键)
  3. Alt+. (按住Alt键的同时点击.键),在一些终端软件中屏蔽了Alt功能键,需要开启
  • command !^      利用上一个命令的第一个参数做cmd的参数
  • command !$      利用上一个命令的最后一个参数做cmd的参数
  • command !*      利用上一个命令的全部参数做cmd的参数
  • command !:n     利用上一个命令的第n个参数做cmd的参数
  • command !n:^    调用第n条命令的第一个参数
  • command !n:$    调用第n条命令的最后一个参数
  • command !n:m    调用第n条命令的第m个参数
  • command !n:*    调用第n条命令的所有参数
  • command !srting:^   从命令历史中搜索string开头的命令,并获取它的第一个参数
  • command !srting:$   从命令历史中搜索string开头的命令,并获取它的最后一个参数
  • command !srting:n   从命令历史中搜索string开头的命令,并获取它的第n个参数
  • command !srting:*   从命令历史中搜索string开头的命令,并获取它的所有参数

三、与history命令相关的环境变量

prupleEndurer @ bash ~/Code $ set | grep HIST
HISTFILE=/home/csdn/.bash_history
HISTFILESIZE=500
HISTSIZE=500

 

  • HISTFILE        :指定了默认命令历史文件说明符
  • HISTFILESIZE:指定默认命令历史文件中保存命令的记录总数,即命令历史文件中最多只有HISTFILESIZE行
  • HISTSIZE       :指定了 history 命令输出的记录数,即输出命令历史文件中的最后HISTSIZE行

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

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

相关文章

YOLOv8改进有效系列目录 | 包含卷积、主干、检测头、注意力机制、Neck上百种创新机制

👑 YOLOv8改进有效系列目录 👑 前言 Hello,各位读者们好 本专栏自开设两个月以来已经更新改进教程60余篇其中包含C2f、主干、检测头、注意力机制、Neck多种结构上创新,也有损失函数和一些细节点上的创新。同时本人一些讲解视频…

基于Python的新闻爬取和推荐系统实践

基于Python的新闻爬取和推荐系统实践 项目概述数据集来源技术栈功能特点普通用户功能管理员功能需求 创新点 项目概述 在这个全功能的新闻爬取和推荐系统项目中,我们致力于构建一个高效、智能的平台,为用户提供个性化的新闻阅读体验。采用了Python语言&…

nodejs+vue+ElementUi摄影预约服务网站系统91f0v

本系统提供给管理员对首页,个人中心,用户管理,员工管理,摄影套餐管理,套餐系列管理,客片欣赏管理,摄影预约管理,摄影订单管理,取片通知管理,摄影评价管理&…

计算机操作系统(OS)——P4文件管理

1、初始文件管理 1.1、文件的属性 1)文件名:由创建文件的用户决定文件名,主要是为了方便用户找到文件,同一目录下不允许有重名文件。 2)标识符:一个系统内的各文件标识符唯一,对用户来说毫无…

stm32 HAL库 4096线ABZ编码器

[TOC]目录 ABZ编码器 4096线 买的是这个 AB相代表计数方向,Z代表过零点 cubemx配置 定时器Encoder 也可以选上DMA 中断 Z相GPIO中断 找一个空闲管脚 打开对应中断 代码 不用DMA int main(void) {short Enc_cnt 0;HAL_TIM_Encoder_Start_IT(&ht…

智慧园区物联综合管理平台之感知连接管理能力简述

物联管理平台感知连接管理主要实现物联传感层设备设施接入通道、 协议解析、 安全保证、 实时数据采集、 控制等管理。 主要包含: 物联南向接入通道管理、 设备智能化协议解析适配(含非设备类物联传感接入)、 物联传感接入注册、 物联传感安全鉴权、 物联感知数据的汇聚/处理…

普中STM32-PZ6806L开发板(使用过程中的问题收集)

Keil使用ST-Link 报错 Internal command error 描述: 在某一次使用过程中,前面都是正常使用, Keil在烧录时报错Internal command error, 试了网上的诸多方式, 例如 升级固件;ST-Link Utility 清除;Keil升级到最新版本;甚至笔者板子的Micro头也换了,因为坏…

kali2.0安装VMware Tools 和自定义改变分辨率

kali2.0安装VMware Tools 和自定义改变分辨率 VMware Tools 简介:VMware Tools安装:自定义改变分辨率:xrandr命令修改分辨率: 前言: 因为kali2.0比较老 所以需要手动安装 WMware Tools 进行复制粘贴操作! …

CA和证书

安全机制 墨菲定律 如果有两种选择,其中一种将导致灾难,则必定有人会作出这种选择。即:做事不要有侥幸心理。 常用安全技术 认证、授权、审计、安全通信 加密算法和协议 对称加密算法 加密和解密使用同一个秘钥。 特性 加密、解密使…

代码随想录刷题第三十五天| 860.柠檬水找零 ● 406.根据身高重建队列 ● 452. 用最少数量的箭引爆气球|

代码随想录刷题第三十五天 柠檬水找零 (LC 860) 题目思路: 代码实现: class Solution:def lemonadeChange(self, bills: List[int]) -> bool:five 0ten 0for money in bills:if money 5:five1if money 10:if five>0:five-1ten1else:return …

【基于C++HTTP 服务器的epoll 改造】

打印模块 Log.hpp 方便使用 #pragma once#include <iostream> #include <string> #include <ctime>#define INFO 1 #define WARNING 2 #define ERROR 3 #define FATAL 4#define LOG(level, message) Log(#level, message, __FILE__, __LINE__)void …

【Python特征工程系列】教你利用XGBoost模型分析特征重要性(源码)

这是Python特征工程系列原创文章&#xff0c;我的第186篇原创文章。 一、问题 应用背景介绍&#xff1a; 如果有一个包含数十个甚至数百个特征的数据集&#xff0c;每个特征都可能对你的机器学习模型的性能有所贡献。但是并不是所有的特征都是一样的。有些可能是冗余的…

RK3568测试tdd

RK3568测试tdd 一、门禁取包二、烧录三、跑tdd用例四、查看结果参考资料 一、门禁取包 右键复制链接&#xff0c;粘贴下载&#xff1b;解压到文件夹&#xff1b; 二、烧录 双击\windows\RKDevTool.exe打开烧写工具&#xff0c;工具界面击烧写步骤如图所示&#xff1a; 推荐…

部署es集群

在单机上利用docker容器运行多个es实例来模拟es集群。不过生产环境推荐大家每一台服务节点仅部署一个es的实例。部署es集群可以直接使用docker-compose来完成&#xff0c;但这要求你的Linux虚拟机至少有4G的内存空间 创建es集群 编写docker-compose文件 首先编写一个docker-…

微信公众号没有留言功能,怎么破?

为什么公众号没有留言功能&#xff1f;2018年2月12日&#xff0c;TX新规出台&#xff1a;根据相关规定和平台规则要求&#xff0c;我们暂时调整留言功能开放规则&#xff0c;后续新注册帐号无留言功能。这就意味着2018年2月12日号之后注册的公众号不论个人主体还是组织主体&…

[spark] SaveMode

https://spark.apache.org/docs/latest/api/java/index.html?org/apache/spark/sql/SaveMode.html Overwrite 覆盖模式是指将DataFrame保存到数据源时&#xff0c;如果数据/表已经存在&#xff0c;则现有数据将被DataFrame的内容覆盖。 注意: Overwrite 模式会覆盖已存在的表…

最优轨迹生成(三)—— 无约束BIVP轨迹优化

本系列文章是学习深蓝学院-移动机器人运动规划课程第五章最优轨迹生成 过程中所记录的笔记&#xff0c;本系列文章共包含四篇文章&#xff0c;依次介绍了微分平坦特性、无约束BVP轨迹优化、无约束BIVP轨迹优、 带约束轨迹优化等内容 本系列文章链接如下&#xff1a; 最优轨迹生…

ElasticSearch历史版本/老版本下载

下载地址 https://www.elastic.co/cn/downloads/past-releases#elasticsearch 搜索所需版本并下载

Grafana增加仪表盘

1.Grafana介绍 grafana 是一款采用Go语言编写的开源应用&#xff0c;主要用于大规模指标数据的可视化展现&#xff0c;是网络架构和应用分析中最流行的时序数据展示工具&#xff0c;目前已经支持绝大部分常用的时序数据库。 Grafana下载地址&#xff1a;https://grafana.com/g…

【网络奇遇记】揭秘计算机网络的性能指标:时延带宽积|往返时间|利用率|丢包率

&#x1f308;个人主页&#xff1a;聆风吟 &#x1f525;系列专栏&#xff1a;网络奇遇记、数据结构 &#x1f516;少年有梦不应止于心动&#xff0c;更要付诸行动。 文章目录 &#x1f4cb;上期回顾一. 时延带宽积二. 往返时间三. 利用率四. 丢包率&#x1f4dd;结语 &#x1…