How to delete the specified file in swap

  
                

In Linux system operation, if you need to delete a file in swap for some reason, what should you do? In fact, delete the files in the swap is very simple, the following small series will give you a description of how to delete a file in the swap under Linux.

The method is simple, according to the following operation on it

vi opens a file when suddenly broken network connection again opened up when vi prompt already exists in a swap inside . What should I do to delete this file?

As follows:

After closing swapoff -a

Then ls -al view

rm the file ending in *.swp in the directory where the file is located OK~

The above is the introduction of a tool to delete a file in swap under Linux. Using this method, you can quickly find the file you want to delete. Is it very simple? Give it a try.

Copyright © Windows knowledge All Rights Reserved