linuxgitgithubterminalrm

How to rename or remove file name with weird quotes and slashes in linux


When I run git status I get:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        "\231"
        "\231\217\373\275\235Y"

So I tried to rename/remove it with:

~/code$ mv \"\\231\" temp
mv: cannot stat '"\231"': No such file or directory

But it doesn't seem to work. I noticed that if I run ls instead I get:

''$'\231'
''$'\231\217\373\275\235''Y'

Any ideas what I'm doing wrong here?


Solution

  • You will need to do something like

    rm ''$'\231'
    

    and

    ''$'\231\217\373\275\235''Y'
    

    or you can mv them.

    Tested and it worked

    enter image description here