当前位置: 首页 > news >正文

长春生物和北京生物是一家吗seo专业培训费用

长春生物和北京生物是一家吗,seo专业培训费用,阿里云做网站多少钱,广安网站设计linux命令之history 1.history介绍 linux命令history会记录并显示用户所执行过的所有命令,也可以对其命令进行修改和删除操作。 2.history用法 history [参数] history参数 参数说明-a将当前会话的历史信息追加到历史文件(.bash_history)中-c删除所有条目从而清…

linux命令之history

1.history介绍

linux命令history会记录并显示用户所执行过的所有命令,也可以对其命令进行修改和删除操作。

2.history用法

history [参数]

history参数
参数说明
-a将当前会话的历史信息追加到历史文件(.bash_history)中
-c删除所有条目从而清空历史列表
-d从指定位置删除历史列表
-r读取历史文件(.bash_history)到缓冲区
-s将指定的命令添加到缓冲区
-w将缓冲区信息写入到历史文件(.bash_history)

3.实例

3.1.将当前会话的历史信息追加到历史文件(.bash_history)中

命令:

history -a

[root@centos79-3 ~]# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=128 time=247 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=128 time=361 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1014ms
rtt min/avg/max/mdev = 247.939/304.742/361.545/56.803 ms
[root@centos79-3 ~]# ping 2.2.2.2
PING 2.2.2.2 (2.2.2.2) 56(84) bytes of data.
^C
--- 2.2.2.2 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2007ms[root@centos79-3 ~]# history -a
[root@centos79-3 ~]# tail -f .bash_history 
#1695879396
cat .bash_history 
#1695879406
clear
#1695879409
ping 1.1.1.1
#1695879414
ping 2.2.2.2
#1695879420
history -a
[root@centos79-3 ~]# 

3.2.从指定位置删除历史列表

命令:

history -d 3

[root@centos79-3 ~]# history | grep 12891289  2023-09-28 13:54:07 root set +o history1313  2023-09-28 14:05:36 root history | grep 1289
[root@centos79-3 ~]# history -d 1289
[root@centos79-3 ~]# history | grep 12891289  2023-09-28 13:55:16 root history1312  2023-09-28 14:05:36 root history | grep 12891313  2023-09-28 14:05:46 root history -d 12891314  2023-09-28 14:05:50 root history | grep 1289
[root@centos79-3 ~]# 

3.3.删除所有条目从而清空历史列表

命令:

history -c

[root@centos79-3 ~]# history -c
[root@centos79-3 ~]# 

3.4.读取历史文件(.bash_history)到缓冲区

命令:

history -r

[root@centos79-3 ~]# history -r
[root@centos79-3 ~]# tail -n 4 .bash_history 
#1695879420
history -a
#1695879044
ifconfig
[root@centos79-3 ~]# 

3.5.将缓冲区信息写入到历史文件(.bash_history)

命令:

history -w

[root@centos79-3 ~]# history -w
[root@centos79-3 ~]# tail -n 4 .bash_history 
#1695880068
clear
#1695880071
history -w
[root@centos79-3 ~]# 

3.6.不记录已执行的历史命令

命令:

set +o history

[root@centos79-3 ~]# set +o history
[root@centos79-3 ~]# ping 111.111.111.111
PING 111.111.111.111 (111.111.111.111) 56(84) bytes of data.
^C
--- 111.111.111.111 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2021ms
[root@centos79-3 ~]# tail -n 1 .bash_history 
set +o history
[root@centos79-3 ~]# 

3.7.取消不记录已执行的历史命令

命令:

set -o history

[root@centos79-3 ~]# history | tail -n 61302  2023-09-28 13:55:10 root ping 16.16.16.161303  2023-09-28 13:55:16 root history1304  2023-09-28 13:55:28 root cat .bash_history 1305  2023-09-28 13:55:42 root history1306  2023-09-28 13:55:51 root history | tail -n 41307  2023-09-28 13:55:58 root history | tail -n 6
[root@centos79-3 ~]# 

另外:

再次执行历史记录命令的三种方式:

第一个方式是:!数字

第二个方式是: ctrl+r 快捷键从小往上搜索,右方向键确定

第三个方式是: !字符串

http://www.ritt.cn/news/4877.html

相关文章:

  • b2c购物平台南宁seo优化公司排名
  • 无锡专业做网站的公司哪家好sem专业培训公司
  • 门店到什么地步可以做网站泉州seo代理计费
  • 怎么做体育直播网站网页制作代码
  • 中卫市建设局网站 冯进强一般开车用什么导航最好
  • 商河县做网站公司ui设计培训班哪家好
  • 做网站大公司seo网站推广报价
  • 兰州优秀网站推广西安全网优化
  • h5网站用什么软件做培训行业seo整站优化
  • 可以自己做网站的软件下载推广策划方案怎么写
  • 上海网站建设专业公司百度知道网页版
  • 关于网站开发论文参考文献四川seo快速排名
  • 网站建设受众新媒体seo指的是什么
  • 公司建立网站的作用有热点新闻事件今日最新
  • 国内自适应网站案例海南百度首页广告
  • 拨付网站建设费用的报告最热门的短期培训课程
  • 网站开发vb语言用什么书seo目标关键词优化
  • 美食网站建设方案买链接
  • 北京网站搜索优化网络推广工作怎么样
  • 做搜狗手机网站优化快网站搜索优化公司
  • 淘宝做网站的靠谱吗常用的网络营销工具有哪些
  • 网站词库怎么做灰色关键词排名代做
  • 企业门户网站内容建设今日新闻最新
  • 外贸网站建设升上去百度推广账号出售
  • 网站设计是什么意思合肥网络推广优化公司
  • 怎么建设外贸网站永久免费个人网站注册
  • 如何通过axure做网站seo关键词排名点击工具
  • 怎么样给网站的服务器续费石家庄seo排名公司
  • 整站模板百度竞价点击软件
  • 在网站用什么做页面布局恢复正常百度