Linux Learning: Vim exercises

Source: Internet
Author: User

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


[[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


[[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 ,[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, $s/^#\ ([[: space:]]\) \+//g

This article is from the "Craft Life" blog, so be sure to keep this source

Linux Learning: Vim exercises

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.