What is the right way to Dispose a swap file that is no longer need?

General support questions
Post Reply
prabha_friend
Posts: 68
Joined: 2020/06/10 14:05:16

What is the right way to Dispose a swap file that is no longer need?

Post by prabha_friend » 2020/09/18 12:49:01

Hi Members,
I am learning asterisk. Need to write an yml file in a particular folder inside a CentOS VirtualBox... But accidentally I saved a file which was not fully completed (starfish.yml). When I try to recreate the file... it is telling that there already is a file named starfish.ymp.swp present in the swap space. How to Dispose of it? What is the right way to do it. Thanks for reading and an advanced thanks for your replies..

With Hope,
Prabhakaran

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: What is the right way to Dispose a swap file that is no longer need?

Post by TrevorH » 2020/09/18 16:36:39

That's not what most people would call a swap file. A swap file is the thing used by the system to enable virtual memory and allows you to run more than your RAM can hold.

The thing you have there is a vim recovery file. It'll be called the same name as the file you are trying to edit but will be suffuxed with .swp and prefixed with a dot ".". You can either run vim -r to recover the previous edit or you can delete the .starfish.yml.swp file.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply