How to modify and save files in linux

王林
Release: 2019-12-26 13:40:02
Original
4534 people have browsed it

How to modify and save files in linux

First open the command console and find the file to be edited. Execute the command ls to see how many files there are below. I have an index.php file below

How to modify and save files in linux

Then execute the commandvi index.php

How to modify and save files in linux

More free learning video tutorials to share:linux video tutorial

If you want to modify the content of this file at this time, press the 'i' key on the keyboard, and the bottom will change to INSERT, and you can modify it

How to modify and save files in linux

Write an echo code to save Esc: wq This is to save, press Enter to save

How to modify and save files in linux

After the saving is completed, open the file again and you will find that you have just The written code has been saved inside.

How to modify and save files in linux

Command not to save Esc: q! This is not to save

How to modify and save files in linux

Recommended related articles and tutorials:linux tutorial

The above is the detailed content of How to modify and save files in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!