swp file is not removed

Fluidko

New Member
Joined
Apr 6, 2022
Messages
1
Reaction score
0
Credits
11
20220406_101131.png

I wanted to remove '.Allclean.swp'.
20220406_101209.png

So I wrote that command with yellow highlightend line.
But why Ubuntu can't find that file?
Thanks.
 


The file .Allclean.swp, would usually be the back-up file created by the text editor vi or vim with the name: Allclean, but that file Allclean has not been written to the disk in that same directory, so vi or vim does the courtesy of saving it for you in the form of a .swp file. You could try to open a file with the command: vim Allclean, with the intention of saving it to disk. Vi or vim will usually tell you then that a .swp file exists and offer you a number of options. If you choose one and then write the file to disk, that might get rid of the .swp file. Then you should be able to remove the file Allclean in the normal way with command: rm. When one writes a file to disk that's been created by vi or vim, normally the .swp file is deleted since you have a copy of the file saved.

The shell is not seeing it for some reason ... it's the shell rather than "Ubuntu" that is giving you that "no such file ..." message. If the above procedure doesn't work, you could check the file's access control listings with the command: getfacl .Allclean.swp. I doubt that there are any access controls on the file, but it's a way to confirm the existence of the file because it will normally output the permissions.

If nothing else works, root will likely remove it without a problem.
 
I'll take a wild guess. The file shows a 0 for link count, and I think that indicates it is no longer associated with an inode. A simple reboot and listing the contents of the directory again may show it gone. If not, I would boot on a live USB and run fsck on the drive. There may be some corruption on the file system.
 

Members online


Top