标签:over margin comm sha1 http aos alt media order
[root@final opt]# cp /etc/passwd /opt/
[root@final opt]# vim /opt/passwd
vim 命令模式操作
// G 光标到最后一行
// gg 光标到第一行
// 删除第二行 按 2G 切换到第二行
按 dd 删除该行
// 复制第一行到最后一行 光标到第一行,按 yy 复制该行
光标切换到最后一行
按 p
// 查找 root 字符串 输入 / root
[root@final opt]# cp /etc/man.config /opt/
// 将 50 到 100 的行之间的小写 man 改为大写‘MAN‘
// 提示 25 次替换,共 23 行
// 将 21 到 42 行之间开头为 # 符号删除
//21 substitutions on 21 lines--21 次替换,共 21 行
//vim 中设置显示行号
使用. vimrc 设置 vim 编辑器
[root@final opt]# vim ~/.vimrc
set nu //开启行号
set ai //开启自动缩进
set tabstop=4 //一个tab键等于4个空格键
//挂载光盘
[root@final opt]# mount /dev/sr0 /media/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@final opt]# mount |tail -1
/dev/sr0 on /media type iso9660 (ro)
//卸载光盘
[root@final ~]# umount /dev/sr0
//列出当前主机已安装所有RPM软件包
[root@final ~]# rpm -qa
//查看firefox软件包的安装清单
[root@final ~]# rpm -ql firefox
//查看ifconfig命令程序是哪个安装哪个软件包后产生的
[root@final ~]# which ifconfig
/sbin/ifconfig
[root@final ~]# rpm -qf /sbin/ifconfig
net-tools-1.60-110.el6_2.x86_64
//查看firefox软件包的用途
[root@final ~]# rpm -qi firefox
Name : firefox Relocations: (not relocatable)
Version : 31.1.0 Vendor: CentOS
Release : 5.el6.centos Build Date: Tue 16 Sep 2014 04:54:04 AM PDT
Install Date: Thu 17 May 2018 06:49:51 AM PDT Build Host: c6b8.bsys.dev.centos.org
Group : Applications/Internet Source RPM: firefox-31.1.0-5.el6.centos.src.rpm
Size : 113050801 License: MPLv1.1 or GPLv2+ or LGPLv2+
Signature : RSA/SHA1, Tue 16 Sep 2014 07:35:33 AM PDT, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : http://www.mozilla.org/projects/firefox/
Summary : Mozilla Firefox Web browser
Description :
Mozilla Firefox is an open-source web browser, designed for standards
compliance, performance and portability.
//查询光盘中的lynx软件包的用途、安装清单
[root@final ~]# rpm -qpi /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm
warning: /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Name : lynx Relocations: (not relocatable)
Version : 2.8.6 Vendor: CentOS
Release : 27.el6 Build Date: Wed 25 Aug 2010 08:18:41 AM PDT
Install Date: (not installed) Build Host: c6b3.bsys.dev.centos.org
Group : Applications/Internet Source RPM: lynx-2.8.6-27.el6.src.rpm
Size : 4934856 License: GPLv2
Signature : RSA/8, Sat 02 Jul 2011 09:43:46 PM PDT, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : http://lynx.isc.org/
Summary : A text-based Web browser
Description :
Lynx is a text-based Web browser. Lynx does not display any images,
but it does support frames, tables, and most other HTML tags. One
advantage Lynx has over graphical browsers is speed; Lynx starts and
exits quickly and swiftly displays web pages.
//查询光盘中wireshark软件包的用途、安装清单
[root@final ~]# rpm -pqi /media/Packages/wireshark-1.8.10-7.el6_5.x86_64.rpm
warning: /media/Packages/wireshark-1.8.10-7.el6_5.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Name : wireshark Relocations: (not relocatable)
Version : 1.8.10 Vendor: CentOS
Release : 7.el6_5 Build Date: Mon 31 Mar 2014 10:23:38 AM PDT
Install Date: (not installed) Build Host: c6b9.bsys.dev.centos.org
Group : Applications/Internet Source RPM: wireshark-1.8.10-7.el6_5.src.rpm
Size : 65581359 License: GPL+
Signature : RSA/SHA1, Mon 31 Mar 2014 10:54:42 AM PDT, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : http://www.wireshark.org/
Summary : Network traffic analyzer
Description :
Wireshark is a network traffic analyzer for Unix-ish operating systems.
This package lays base for libpcap, a packet capture and filtering
library, contains command-line utilities, contains plugins and
documentation for wireshark. A graphical user interface is packaged
separately to GTK+ package.
//查找该命令是从哪个安装包安装后产生的
[root@final ~]# which vi vim
/bin/vi
/usr/bin/vim
[root@final ~]# rpm -qf /bin/vi
vim-minimal-7.2.411-1.8.el6.x86_64
[root@final ~]# rpm -qf /usr/bin/vim
vim-enhanced-7.2.411-1.8.el6.x86_64
//删除vim vi命令
[root@final ~]# \rm /bin/vi /usr/bin/vim
//修复vim vi
[root@final ~]# rpm -ivh /media/Packages/vim-minimal-7.2.411-1.8.el6.x86_64.rpm --force
[root@final ~]# rpm -ivh /media/Packages/vim-enhanced-7.2.411-1.8.el6.x86_64.rpm --force
//安装bind-chroot,解决依赖关系
[root@final ~]# rpm -ivh /media/Packages/bind-chroot-9.8.2-0.30.rc1.el6.x86_64.rpm
warning: /media/Packages/bind-chroot-9.8.2-0.30.rc1.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
bind = 32:9.8.2-0.30.rc1.el6 is needed by bind-chroot-32:9.8.2-0.30.rc1.el6.x86_64
//先安装bind安装包
[root@final ~]# rpm -ivh /media/Packages/bind-9.8.2-0.30.rc1.el6.x86_64.rpm
warning: /media/Packages/bind-9.8.2-0.30.rc1.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:bind ########################################### [100%]
//依赖包安装好之后,在安装bind-chroot
[root@final ~]# rpm -ivh /media/Packages/bind-chroot-9.8.2-0.30.rc1.el6.x86_64.rpm
warning: /media/Packages/bind-chroot-9.8.2-0.30.rc1.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:bind-chroot ########################################### [100%]
[root@final ~]# rpm -qa bind-chroot
bind-chroot-9.8.2-0.30.rc1.el6.x86_64
//RPM卸载
[root@final ~]# rpm -e bind
error: Failed dependencies:
bind = 32:9.8.2-0.30.rc1.el6 is needed by (installed) bind-chroot-32:9.8.2-0.30.rc1.el6.x86_64
[root@final ~]# rpm -e bind-chroot
[root@final ~]# rpm -e bind
[root@final ~]# rpm -qa bind
[root@final ~]# rpm -qa bind-chroot
标签:over margin comm sha1 http aos alt media order
原文地址:https://www.cnblogs.com/fina/p/9067266.html