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 withrm -rf
nor withsudo rm -rf
- Its
time of creation
is the same asfoo.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 offoo.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)
cannot be removed
– What exact command(s) do you invoke to try to remove it? What is the error? When you're runningcat <!--
, is the command literallycat <!--
? I'm asking because<
and!
are special for the shell. The desired command iscat '<!--'
, I guess.<!--
; socat \<\!--
. There is no error.