0

I have recently noticed a file that I have not intentionally created, appearing in directories with files I have intentionally created:

<!--

The file contents change depending on location, but is generally text from another file in the same directory.

e.g.

.../Foo/
        <!--
        foo.js

in Code/Foo/, there exist files<!-- and foo.txt, where cat <!-- === cat foo.txt

  • This file <!-- cannot be removed with rm -rf nor with sudo rm -rf
  • Its time of creation is the same as foo.txt
  • Changes to foo.txt are not seen in <!--
  • In git directories, git wants to commit <!-- (as one might expect)
  • ls -lash reveals file size of <!-- at creation === file size of foo.txt before changes

Search engine results have been fruitless, I believe because the file is composed of symbols (or my search-foo is poor).

What might be generating this file? How might I rid myself of this (likely self-inflicted) curse? 🙏

Env: MBP 2017 MacOs; Mojave; v10.14.6 / zsh 5.8 (x86_64-apple-darwin18.7.0)

2
  • 1
    cannot be removed – What exact command(s) do you invoke to try to remove it? What is the error? When you're running cat <!--, is the command literally cat <!--? I'm asking because < and ! are special for the shell. The desired command is cat '<!--', I guess. Commented Mar 21, 2020 at 20:04
  • The exact command is a tab-completed, escaped <!--; so cat \<\!--. There is no error.
    – RJones
    Commented Mar 22, 2020 at 19:12

2 Answers 2

1

Files with weird names can be manipulated by e.g. ./'<--' (the ./ to avoid any issues with names confused with switches, the single quotes so any characters the shell processes specially lose their meaning).

1
  • Ah of course! This definitely deletes the file
    – RJones
    Commented Mar 22, 2020 at 19:21
0

I found this, in reference to your foo.js file: https://github.com/uupaa/Foo.js/wiki/Foo

Also this: https://gist.github.com/ryanflorence/5a99e069aca0a35d51e66f2d7fde5b80

Apparently, both are files linked to a webmodule of some sort, probably imported by a browser extension.

They don't seem malignant.

1
  • Thanks- I should state that the directory Foo and the file(s) foo.js/foo.txt are representations, rather than the exact filetype. The filetype of the siblings of <!-- does not appear to have any consistency or show correlation.
    – RJones
    Commented Mar 22, 2020 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .