目录
实操文件
May 7 20:18:07 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 7 20:18:07 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 7 20:18:15 localhost libvirtd: 2025-05-07 12:18:15.121+0000: 1435: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 7 20:18:16 localhost libvirtd: 2025-05-07 12:18:16.166+0000: 1435: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 7 20:18:16 localhost libvirtd: 2025-05-07 12:18:16.183+0000: 1435: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 7 20:19:21 localhost gnome-keyring-daemon[9120]: couldn't create login keyring: An error occurred on the device May 7 20:19:30 localhost journal: not GsPlugin error from plugin repos g-key-file-error-quark:1: Key file contains line “ file:///media/cdrom/” which is not a key-value pair, group, or comment May 8 09:13:05 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 8 09:13:06 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 8 09:13:14 localhost libvirtd: 2025-05-08 01:13:14.077+0000: 1336: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 09:13:14 localhost libvirtd: 2025-05-08 01:13:14.142+0000: 1336: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 09:13:14 localhost libvirtd: 2025-05-08 01:13:14.158+0000: 1336: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 10:09:23 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 8 10:09:24 localhost mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 8 10:09:31 localhost libvirtd: 2025-05-08 02:09:31.618+0000: 1419: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 10:09:31 localhost libvirtd: 2025-05-08 02:09:31.660+0000: 1419: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 10:09:31 localhost libvirtd: 2025-05-08 02:09:31.673+0000: 1419: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 8 10:25:15 localhost journal: Error setting property 'DesktopId' on interface org.freedesktop.GeoClue2.Client: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/GeoClue2/Client/1 (g-dbus-error-quark, 19) May 8 10:25:15 localhost journal: Error setting property 'RequestedAccuracyLevel' on interface org.freedesktop.GeoClue2.Client: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/GeoClue2/Client/1 (g-dbus-error-quark, 19) May 8 10:36:08 localhost journal: shell-extensions did not set error for gs_plugin_refresh May 8 10:59:15 localhost journal: shell-extensions did not set error for gs_plugin_refresh May 9 09:25:48 localhost journal: shell-extensions did not set error for gs_plugin_refresh May 9 14:54:18 zhao mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 9 14:54:18 zhao mcelog: Family 6 Model 141 CPU: only decoding architectural errors May 9 14:54:40 zhao libvirtd: 2025-05-09 06:54:40.641+0000: 2078: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 9 14:54:40 zhao libvirtd: 2025-05-09 06:54:40.660+0000: 2078: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 9 14:54:40 zhao libvirtd: 2025-05-09 06:54:40.662+0000: 2078: error : virHostCPUGetTscInfo:1389 : 无法打开 tty /dev/kvm: 没有那个文件或目录 May 12 11:01:44 zhao journal: not GsPlugin error from plugin repos g-key-file-error-quark:1: Key file contains line “ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/” which is not a key-value pair, group, or comment May 12 11:01:53 zhao journal: shell-extensions did not set error for gs_plugin_refresh May 12 11:06:04 zhao journal: shell-extensions did not set error for gs_plugin_refresh May 12 11:08:23 zhao rz[19211]: [root] deepin-desktop-community-20.9-amd64.iso/ZMODEM: error: zgethdr returned TIMEOUT May 12 11:08:23 zhao rz[19211]: [root] deepin-desktop-community-20.9-amd64.iso/ZMODEM: error May 12 11:08:23 zhao rz[19211]: [root] no.name/ZMODEM: got error May 13 10:12:48 zhao gnome-keyring-daemon[16982]: couldn't create login keyring: An error occurred on the device May 13 11:59:41 zhao libvirtd: 2025-05-13 03:59:41.571+0000: 1312: error : virFirewallApplyRuleFirewallD:790 : The name org.fedoraproject.FirewallD1 was not provided by any .service files May 13 13:30:02 zhao systemd: Started Session 207 of user root. May 13 13:36:27 zhao dhclient[1244]: DHCPREQUEST on ens33 to 192.168.158.254 port 67 (xid=0x391a628f) May 13 13:36:27 zhao dhclient[1244]: DHCPACK from 192.168.158.254 (xid=0x391a628f) May 13 13:36:29 zhao dhclient[1244]: bound to 192.168.158.30 -- renewal in 698 seconds. May 13 13:40:01 zhao systemd: Started Session 208 of user root. May 13 13:48:07 zhao dhclient[1244]: DHCPREQUEST on ens33 to 192.168.158.254 port 67 (xid=0x391a628f) May 13 13:48:07 zhao dhclient[1244]: DHCPACK from 192.168.158.254 (xid=0x391a628f) May 13 13:48:09 zhao dhclient[1244]: bound to 192.168.158.30 -- renewal in 859 seconds. May 13 13:50:01 zhao systemd: Started Session 209 of user root. May 13 14:00:01 zhao systemd: Started Session 210 of user root. May 13 14:01:01 zhao systemd: Started Session 211 of user root. May 13 14:02:28 zhao dhclient[1244]: DHCPREQUEST on ens33 to 192.168.158.254 port 67 (xid=0x391a628f) May 13 14:02:28 zhao dhclient[1244]: DHCPACK from 192.168.158.254 (xid=0x391a628f) May 13 14:02:30 zhao dhclient[1244]: bound to 192.168.158.30 -- renewal in 687 seconds. May 13 14:10:01 zhao systemd: Started Session 212 of user root. May 13 14:13:57 zhao dhclient[1244]: DHCPREQUEST on ens33 to 192.168.158.254 port 67 (xid=0x391a628f) May 13 14:13:57 zhao dhclient[1244]: DHCPACK from 192.168.158.254 (xid=0x391a628f) May 13 14:13:59 zhao dhclient[1244]: bound to 192.168.158.30 -- renewal in 699 seconds. May 13 14:15:29 zhao systemd: Time has been changed May 13 14:15:30 zhao kernel: e1000: ens33 NIC Link is Down May 13 14:15:40 zhao rtkit-daemon[830]: The canary thread is apparently starving. Taking action. May 13 14:15:40 zhao rtkit-daemon[830]: Demoting known real-time threads. May 13 14:15:40 zhao rtkit-daemon[830]: Demoted 0 threads. May 13 14:15:46 zhao kernel: e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None May 13 14:16:31 zhao chronyd[858]: Can't synchronise: no majority May 13 14:17:36 zhao chronyd[858]: Source 111.230.189.174 replaced with 202.118.1.130 May 13 14:18:33 zhao chronyd[858]: Selected source 162.159.200.123 May 13 14:20:01 zhao systemd: Started Session 213 of user root. May 13 14:21:56 zhao chronyd[858]: Selected source 202.118.1.130 May 13 14:25:39 zhao dhclient[1244]: DHCPREQUEST on ens33 to 192.168.158.254 port 67 (xid=0x391a628f) May 13 14:25:39 zhao dhclient[1244]: DHCPACK from 192.168.158.254 (xid=0x391a628f) May 13 14:25:41 zhao dhclient[1244]: bound to 192.168.158.30 -- renewal in 784 seconds. May 13 14:30:01 zhao systemd: Started Session 214 of user root.
命令模式练习
-
打开任意文本文件,使用
gg跳转到首行,再用G跳转到末尾

-
在命令模式下:
-
用
yy复制当前行
-
用
p粘贴到下一行
-
用
5dd删除包括当前行在内的5行内容
-
-
使用
/error查找文档中的"error"关键词,用n/N进行正向/反向查找
-
用
r命令将光标所在字符替换为"X"
-
用
d$删除从光标位置到行尾的所有内容
插入模式练习
-
在命令模式下:
-
按
o在下方新建行并输入文本
-
按
A跳转到行尾继续输入
-
按
I跳转到行首输入
-
-
使用
O在当前行上方插入新行,输入内容后按ESC返回命令模式 -
练习从插入模式返回命令模式时:
-
用
i进入插入模式,观察返回时光标位置变化

-
用
a进入插入模式,比较光标位置差异

-
末行模式练习
-
执行
:set nu显示行号,再用:set nonu取消显示
-
使用
:15直接跳转到第15行
-
对10-20行执行范围替换:
:10,20s/error/warning/g -
执行全文替换:
-
:%s/error/ERROR/替换每行第一个"error"
-
:%s/error/ERROR/g替换所有"error"
-
-
练习
:X设置文件密码,再通过:set key=""取消密码
-
用
:w test_backup.txt另存为副本文件
视图模式练习
-
用
v进入行选择模式:
-
选中3行后按
y复制
-
移动光标后用
p粘贴
-
用
Ctrl+v进入列块模式:
-
纵向选中多列字符后按
d删除
-
选中列后按
I#添加注释,按两次ESC生效
-
批量注释:
-
用列块模式选中多行行首 -
插入
#注释符
-
再次用列块模式删除注释符

高级操作练习
-
在末行模式执行
:r !date插入当前日期到光标下方
-
用
:5r !ls -l将命令结果插入到第5行下方
-
尝试
:!ls执行外部命令后返回编辑界面

注意:
-
所有操作前建议先备份文件
-
谨慎使用
:!command执行会修改文件内容的命令 -
批量操作前可用
v模式确认选中范围: -
替换操作建议先用
/确认匹配内容 -
涉及密码操作时注意文件权限安全
807

被折叠的 条评论
为什么被折叠?



