Score:0

~/.bashrc.swp file corrupt

us flag

When I opened vi ~/.bashrc, it gives the below error: how to fix it?

E325: ATTENTION
Found a swap file by the name "~/.bashrc.swp"
          owned by: imren   dated: Thu Dec 23 00:38:57 2021
         file name: ~imren/.bashrc
          modified: YES
         user name: imren   host name: imren-Inspiron-3542
        process ID: 4467
While opening file "/home/imren/.bashrc"
             dated: Thu Dec 23 19:05:17 2021
      NEWER than swap file!

(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 /home/imren/.bashrc"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/home/imren/.bashrc.swp"
    to avoid this message.
"~/.bashrc" 117 lines, 3771 characters
Press ENTER or type command to continue
in flag
Delete the swap file. It’s just a temporary file that is created when you open something in `vi`. If you closed the terminal (or SSH connection) without first exiting `vi`, then the temporary file remains. There’s no harm in deleting it, though
us flag
could you say to me how to delete swap file please ?
nobody avatar
gh flag
`rm /home/imren/.bashrc.swp` should do the job.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.