Get the App
SLTechnology News&Howtos  ›  Servers  › 

Which is the command for editors to save and not quit in linux

Shulou Source: shulou.com Published: 2022-05-31 10:52:30 10月02日 Update

This article mainly introduces the relevant knowledge of "which is the command that editors save not to quit in linux". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope that this article "which command is saved by editors in linux" can help you solve the problem.

Save the command that does not exit: 1. The ": W" command, which can save the edited data without exiting vim;2, ": W!" Command, which forces the edited data to be saved without exiting the vim;3, ": W file name" command, which saves the edited data separately in the specified file, and does not exit vim.

This article operating environment: linux7.3 system, Dell G3 computer.

What is the command for editors to save and not quit in linux

W-Save the file, do not quit vim, and write the edited data to the hard disk file (commonly used)

W file-Save the changes to file separately, do not exit vim, and save the edited data as another file (similar to saving a new file)

W!-Force save, do not exit vim, if the file attribute is "read-only", force to write to the file. However, whether you can write or not has something to do with your permission to the file.

Command mode, and then type: W to save, or you can enter: wq! Save the file and exit.

The following is the save command:

W Save the file without exiting vi

W file saves the changes to file and does not exit vi

: w! Forced save, do not launch vi

Wq saves the file and exits vi

: wq! Force to save the file and exit vi

: Q quit vi without saving the file

: q! Do not save the file, force to exit vi

: e! Discard all changes and edit since the last time the file was saved

This is the end of the content about "which command does not quit is saved by editors in linux". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Commands files enforcement data files knowledge industries inputs different practical content practical practical attributes commonly used file names articles methods more permissions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB MySQL Huawei Apple Shulou Technology