命令操作如下所示:
[root@localhost ~]# vim ~/.vimrc set nu //开启行号 set ai //开启自动缩进 set tabstop=4 //一个tab键等于4个空格键 ……将光盘挂载到该目录下,并查看结果。 命令操作如下所示:
[root@localhost ~]# mkdir /myiso [root@localhost ~]# mount /dev/cdrom /myiso/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# mount | tail -1 /dev/sr0 on /myiso type iso9660 (ro) [root@localhost ~]#再将光盘从该目录卸载,并查看结果。 卸载时自己本身不要在/myiso目录下,否则会提示你设备正忙不能卸载成功。 命令操作如下所示:
[root@localhost ~]# mount | tail -1 /dev/sr0 on /myiso type iso9660 (ro) [root@localhost ~]# umount /myiso/ [root@localhost ~]# mount | grep /dev/cdrom [root@localhost ~]#命令操作如下所示:
[root@localhost ~]# rpm -qa命令操作如下所示:
[root@localhost ~]# rpm -ql firefox命令操作如下所示:
[root@localhost ~]# which ifconfig /sbin/ifconfig [root@localhost ~]# rpm -qf /sbin/ifconfig net-tools-1.60-110.el6_2.x86_64 [root@localhost ~]#命令操作如下所示:
[root@localhost ~]# rpm -qi firefox Name : firefox Relocations: (not relocatable) Version : 17.0.10 Vendor: Red Hat, Inc. Release : 1.el6_4 Build Date: 2013年10月23日 星期三 21时14分43秒 Install Date: 2015年01月06日 星期二 20时59分04秒 Build Host: x86-027.build.eng.bos.redhat.com Group : Applications/Internet Source RPM: firefox-17.0.10-1.el6_4.src.rpm Size : 30424459 License: MPLv1.1 or GPLv2+ or LGPLv2+ Signature : RSA/8, 2013年10月29日 星期二 16时20分45秒, Key ID 199e2f91fd431d51 Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> 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. [root@localhost ~]#首先将光盘设备手动挂载到/media目录,进行查询操作。 命令操作如下所示:
[root@localhost ~]# umount /dev/cdrom [root@localhost ~]# mount /dev/cdrom /media/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# mount | tail -1 /dev/sr0 on /media type iso9660 (ro) [root@localhost ~]# rpm -qpi /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm Name : lynx Relocations: (not relocatable) Version : 2.8.6 Vendor: Red Hat, Inc. Release : 27.el6 Build Date: 2010年05月14日 星期五 23时06分49秒 Install Date: (not installed) Build Host: x86-006.build.bos.redhat.com Group : Applications/Internet Source RPM: lynx-2.8.6-27.el6.src.rpm Size : 4934856 License: GPLv2 Signature : RSA/8, 2010年08月17日 星期二 02时19分49秒, Key ID 199e2f91fd431d51 Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> 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. [root@localhost ~]# rpm -qpl /media/Packages/lynx-2.8.6-27.el6.x86_64.rpm ……命令操作如下所示:
[root@localhost ~]# rpm -qpi /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm warning: /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Name : wireshark Relocations: (not relocatable) Version : 1.8.10 Vendor: Red Hat, Inc. Release : 4.el6 Build Date: 2013年09月24日 星期二 16时07分48秒 Install Date: (not installed) Build Host: x86-007.build.bos.redhat.com Group : Applications/Internet Source RPM: wireshark-1.8.10-4.el6.src.rpm Size : 65581264 License: GPL+ Signature : RSA/8, 2013年10月16日 星期三 16时27分55秒, Key ID 199e2f91fd431d51 Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> 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@localhost ~]# rpm -qpl /media/Packages/wireshark-1.8.10-4.el6.x86_64.rpm ……命令操作如下所示:
[root@localhost ~]# which vi vim /bin/vi /usr/bin/vim [root@localhost ~]# rpm -qf /bin/vi vim-minimal-7.2.411-1.8.el6.x86_64 [root@localhost ~]# rpm -qf /usr/bin/vim vim-enhanced-7.2.411-1.8.el6.x86_64 [root@localhost ~]#命令操作如下所示:
[root@localhost ~]# rm -rf /bin/vi /usr/bin/vim [root@localhost ~]#首先将光盘设备手动挂载到/media目录,进行修复操作。 命令操作如下所示:
[root@localhost ~]# umount /dev/cdrom [root@localhost ~]# mount /dev/cdrom /media/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# rpm -qf /bin/vi vim-minimal-7.2.411-1.8.el6.x86_64 [root@localhost ~]# rpm -qf /usr/bin/vim vim-enhanced-7.2.411-1.8.el6.x86_64 [root@localhost ~]# rpm -ivh --force /media/Packages/vim-minimal-7.2.411-1.8.el6.x86_64.rpm warning: /media/Packages/vim-minimal-7.2.411-1.8.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:vim-minimal ########################################### [100%] [root@localhost ~]# rpm -ivh --force /media/Packages/vim-enhanced-7.2.411-1.8.el6.x86_64.rpm warning: /media/Packages/vim-enhanced-7.2.411-1.8.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:vim-enhanced ########################################### [100%] [root@localhost ~]#命令操作如下所示:
[root@localhost ~]# cd /media/Packages [root@svr5 Packages]# rpm -ivh bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm error: Failed dependencies: bind = 32:9.8.2-0.17.rc1.el6_4.6 is needed by bind-chroot-32:9.8.2-0.17.rc1.el6_4.6.x86_64 [root@svr5 Packages]# rpm -ivh bind-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm Preparing... ########################################### [100%] 1:bind ########################################### [100%] [root@svr5 Packages]# rpm -ivh bind-chroot-9.8.2-0.17.rc1.el6_4.6.x86_64.rpm Preparing... ########################################### [100%] 1:bind-chroot ########################################### [100%]