1. Copy the/etc/grub.conf configuration file to the/tmp directory and use the Find replacement command to delete the white space character at the beginning of the/etc/grub.conf file
1 2
|
|
[[email protected] tmp] # cp-sv/etc/grub.conf. "/etc/grub.conf" - "./grub.conf" |
2. Copy the/etc/rc.d/init.d/functions file to the/tmp directory and add a # to the beginning of the line beginning with a white-space character for each line of/tmp/functions with the Find replacement command
1 2 |
|
[[Email protected] ~]# cp -pv /etc/rc.d/init.d/ Functions /tmp "/etc/rc.d/init.d/functions" -> "/tmp/functions" |
3.   replace/tmp/ The/etc/sysconfig/init in the functions file is/var/log
1 |
|
: 1 ,[email protected]/etc/sysconfig/[ Email protected]/var/[email protected] |
4. Delete all lines beginning with # in the/tmp/functions file with # followed by at least one white space character at the beginning of the line #
1
|
|
:1, $s/^#\ ([[: space:]]\) \+//g |
This article is from the "Craft Life" blog, so be sure to keep this source http://allenh.blog.51cto.com/481430/1693508
Linux Learning: Vim exercises