Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are swo and swp files in JBoss log dir?

I have files

server.log .server.log.swo .server.log.swp 

how to open swo and swp?

like image 971
IAdapter Avatar asked Feb 18 '11 09:02

IAdapter


People also ask

What are Swo and SWP files?

The . swp is created when a file is opened in the editor. The . swo is created if the file is edited and the . swp already exists.

Where can I find SWP files?

swp is a swap file, containing the unsaved changes. While editing a file, you can see which swap file is being used by entering :sw . The location of this file is set with directory option. The default value is .,~/tmp,/var/tmp,/tmp .

Can I delete .SWP files?

Use the swap -d command to remove swap space. The swap file name is removed from the list so that it is no longer available for swapping. The file itself is not deleted. Edit the /etc/vfstab file and delete the entry for the swap file.

What are vim swap files?

The reason this message comes up is that every time you edit a file, vim creates something called a "swapfile". A swapfile is a bit like an autosave file -- it keeps track of the current state of your document -- but it also stores additional information about your editing session (such as your undo/redo history).


2 Answers

Those are temporary files created by the vim editor. The .swp is created when a file is opened in the editor. The .swo is created if the file is edited and the .swp already exists. Edit it a third time and you get a .swn, and so on. When vim is closed, those files should go away. If vim crashes or is killed, they may be left behind. They are safe to ignore.

like image 130
Devon_C_Miller Avatar answered Sep 17 '22 14:09

Devon_C_Miller


the files remain even after vim is closed we need to use vim in recover mode, save and then move the files to a different name. then delete the .sw* files.

like image 30
user1543544 Avatar answered Sep 17 '22 14:09

user1543544