当前位置:网站首页>VIM, another program may be editing the same file If this is the solution of the case
VIM, another program may be editing the same file If this is the solution of the case
2022-07-04 12:36:00 【Menon research monk】
The problem is shown in
adopt vim perhaps vi When editing the file, the following appears: :
The terminal displays as follows :
Found a swap file by the name "/mydata/mysql/conf/.my.conf.swp"
owned by: root dated: Sat Jul 02 12:52:53 2022
file name: /mydata/mysql/conf/my.conf
modified: YES
user name: root host name: xx
process ID: xx
While opening file "/mydata/mysql/conf/my.conf"
CANNOT BE FOUND
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /mydata/mysql/conf/my.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/mydata/mysql/conf/.my.conf.swp"
to avoid this message.
Swap file "/mydata/mysql/conf/.my.conf.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
The screenshot is as follows :
2. Principle analysis
stay linux In order to ensure security , If the document is inconsistent
For example, multiple people edit this file, resulting in different files 、 Last edit did not exit normally
Will generate a file suffix swp File format ( Temporary exchange file , Main backup buffer contents )
The way of saving or writing files is correct , commonly swp Format files will be automatically deleted , If there is an error in writing , Temporary files will always exist , When you edit it again, you will always point to changing the file
Delete it and re edit it or restore it and re edit it
3. resolvent
adopt ls -al When viewing all the files
You can see swp Format ( Hide temporary files , Temporary buffer )
vim Edit the prompt that appears :
Solve it according to the following tips
If the file is not important , direct q sign out ,rm -rf Delete it and try again 
边栏推荐
- Practical dry goods: deploy mini version message queue based on redis6.0
- Communication tutorial | overview of the first, second and third generation can bus
- How to realize the function of Sub Ledger of applet?
- When synchronized encounters this thing, there is a big hole, pay attention!
- Practice of retro SOAP Protocol
- Anti clockwise rotation method of event arrangement -- PHP implementation
- Classification and application of AI chips
- Alibaba cloud server connection intranet operation
- 8.8.1-PointersOnC-20220214
- C语言:围圈报号排序问题
猜你喜欢

0x15 string

The latest idea activation cracking tutorial, idea permanent activation code, the strongest in history

How to use "bottom logic" to see the cards in the world?

How to realize the function of Sub Ledger of applet?

22 API design practices

TCP slicing and PSH understanding

Complementary knowledge of auto encoder
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 24](/img/2e/b1f348ee6abaef24b439944acf36d8.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 24

DVC use case (VI): Data Registry

How to judge the advantages and disadvantages of low code products in the market?
随机推荐
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
[Chongqing Guangdong education] National Open University spring 2019 2727 tax basis reference questions
[ES6] template string: `string`, a new symbol in es2015
Entity framework calls Max on null on records - Entity Framework calling Max on null on records
Xshell's ssh server rejected the password, failed to skip publickey authentication, and did not register with the server
template<typename MAP, typename LIST, typename First, typename ... Keytypes > recursive call with indefinite parameters - beauty of Pan China
0x15 string
Netgear switch basic configuration command set
C語言:求100-999是7的倍數的回文數
C语言:围圈报号排序问题
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
记一次 Showing Recent Errors Only Command /bin/sh failed with exit code 1 问题
queue
Global and Chinese markets for environmental disinfection robots 2022-2028: Research Report on technology, participants, trends, market size and share
Googgle guava ImmutableCollections
Snowflake won the 2021 annual database
Entitas learning [iv] other common knowledge points
MySQL performance optimization index
JD home programmers delete databases and run away. Talk about binlog, the killer of MySQL data backup