Who Shall Rid Me of this Meddlesome Folder?
August 8, 2016 11:51 AM   Subscribe

I’m running OS X10.11.6. A week or so ago a new folder showed up on my hard drive, labeled only with a tilde (~). I have no idea where it came from, and can't get rid of it.

Inside that folder is another folder (Library), inside that is another folder (Application Support), inside that is a final folder titled HelloDeskMetricsObjC, which is empty.

If I delete the entire ~ folder it all comes back when I restart my computer. As far as I can tell I haven’t added any applications this could be supporting, nor does anything like it appear in my Login Items menu. I can find only one reference online: in Japanese, where someone seems to have the exact same problem. (I can’t really tell, but I don’t think he or she resolved it.)

What is this/where did it come from/how do I get rid of it?
posted by LeLiLo to Computers & Internet (8 answers total)
 
~ in unix-speak symbolizes your home directory.

DeskMetrics seems to be a metrics program which gets installed with some applications.

My suspicion is that you have something that has a broken installer or runtime that is specifying 'Desktop/~' or './~' as the home directory instead of just '~' that's causing this to get created. I would recommend looking at your Applications folder, sorting by date, and looking at things that have been installed since (or around the time) you started noticing the folder.
posted by jferg at 12:01 PM on August 8, 2016 [5 favorites]


Whatever software created the files in that ~ directory did it by mistake (they failed to use shell expansion on ~), and probably can't find it since when it looks for the ~/Application Support/HelloDeskMetricsObjC folder, ~ is expanded to your home directory (/Users/your-login-name). So you're probably safe to just delete ~. But, of course, make a backup first in case deleting it does break something. I doubt it will, though.

When you delete ~, make sure you either do it from Finder, or specify the path exactly so that you don't accidentally delete your home directory. E.g.,
rm -rf ./~
will work. But
rm -rf ~
Will delete your home directory and you'll be very unhappy.
posted by dis_integration at 12:17 PM on August 8, 2016 [3 favorites]


Best answer: The advice given on that Japanese thread is all reasonable advice:
  • See if anything has been added to your Login Items (System Preferences > Users & Groups)
  • Launch Activity Monitor to see if you can locate anything suspicious.
  • Run Console.app to see if you can figure out what is creating the folder.

posted by adamrice at 12:27 PM on August 8, 2016 [1 favorite]


Okay, here's how you find out who is accessing that folder. Open terminal and run this command:

$ sudo opensnoop 2> /dev/null | grep -i \~


I created a folder called ~ on my desktop then opened it with sublime text, here is sample output:

501 14288 Sublime Text 2 12 /Users/jeffamaphone/Desktop/~


Only problem is you have to run this before someone accesses the folder, so you may have to go launch a bunch of apps until you figure it out. If it only accesses it at startup, who knows?

It looks like DeskMetrics is some sort of analytics package that other apps include. Their example code on their webpage is called HelloDeskMetricsObjC. So someone copied their sample code and did it poorly.
posted by jeffamaphone at 3:41 PM on August 8, 2016


See also for further discussions on file access monitoring.
posted by jeffamaphone at 3:46 PM on August 8, 2016 [1 favorite]


Where on your hard drive is this file?

You can also delete it though the terminal by doing:

rm \~

\ means that the next character is to be literally interpreted as what it is and not as a shortcut to something else.
posted by I-baLL at 5:17 PM on August 8, 2016


Response by poster: Thanks for the replies. Puzzling out the Japanese using Google Translate, I hadn’t gotten anywhere with Login Items or the Activity Monitor, but thanks to adamrice, I moved on to the Console.app (which I'd never used before). This alerted me that it wasn’t a new application, but a botched update of Photoshop/Lightroom CC that had caused the folder to appear. I just updated again, to the newest versions, and now the folder (finally) has disappeared.

p.s.
Open terminal and run this command: $ sudo opensnoop 2> /dev/null | grep -i \~
I tried this and got nothing in the next line. (Sublime text also looks like it’s way over my head.)

Where on your hard drive is this file?
It wasn’t any file, just a stack of folders that showed up in the root directory, the last one of which was empty.
posted by LeLiLo at 12:50 AM on August 9, 2016


I tried this and got nothing in the next line. (Sublime text also looks like it’s way over my head.)

If you just run:
$ sudo opensnoop

...you can see all of the output.

The rest of the command filters random errors (there were a lot, so I just redirected them to /dev/null), and then filters it to only show output that contains a ~. The fact that you didn't see anything means nobody was touching anything that had a ~ in it at the time that opensnoop was running. Sublime Text was just a way for me to force something to touch the test folder I created to verify the command worked, and isn't really germane to the problem or solution.

Anyway, glad your issue was resolved. I'm in no way surprised Adobe was that cause. :-/
posted by jeffamaphone at 9:41 AM on August 9, 2016 [1 favorite]


« Older Lunch or early dinner between Boston and...   |   Seattle to San Diego, scooter version Newer »
This thread is closed to new comments.