I accidentally used "touch .." , is there a way to safely delete this document? I am using zsh, macOS 11.0.1 (Big Sur), was working on a project and for some stupid reason I decided to write touch ... A file was created in the Desktop so I don't think that it will affect the computer's performance in any way.
I tried doing vim .. and a document was opened.
It contains so many things it is not the one that I just created, also on the top I read /Users/Serax instead of /Users/Serax/Desktop.
I don't want to damage or delete something that i should not. I tried using mv .. my_stupid_mistake.txt but it didn't work.
I also checked Desktop in the finder but found nothing.
Is it safe to do rm ..?
Do not delete it! In unixish filesystems (including macOS), .. is a link to the parent directory. So if you were in the directory /Users/Serax/Desktop and you ran touch .., that's equivalent to touch /Users/Serax, which just marks your home directory as being modified.
Similarly, when you're in /Users/Serax/Desktop, trying to delete .. is equivalent to trying to delete your home directory. If you succeeded, you'd lose all your files. You do not want to do this.
Running that touch command will not have damaged anything, so there's nothing that needs to be fixed, deleted, or cleaned up. Just go about your business.
BTW, do you have a good backup? If not, I'd strongly recommend you make one. Because accidents happen, and sometimes you delete your entire home directory by mistake.