2

I noticed there is a folder titled "~" - no quotes, in my home directory. If I delete it, it instantly reappears. Why is this there and how can I make it go away?

Insperatus
  • 4,693

1 Answers1

2

Next time you can run lsof | grep /home/**yourusername**/~ and see what process is creating the file or has it open.

Jorge Castro
  • 71,754
mfisch
  • 3,643
  • 2
    Or just lsof /home/yourusername/\~. (Also, ~ is only expanded when it's at the beginning of a path. So the \ is not necessary.) – Eliah Kagan Jul 10 '12 at 16:45
  • I'm marking this solved because if the directory reappears you will have solved at least one half of my question.

    Thank you

    – Insperatus Jul 11 '12 at 03:57
  • @mfisch So the "~" folder reappeared in /home the other day but I didn't notice it right away. I tried both the suggested commands but neither gave any output. Is this possibly because the process or file that created the folder is no longer running? – Insperatus Aug 15 '12 at 22:47
  • Yes, I think that's why you had no output. Is it getting created on login perhaps? Can you narrow that down based on the creation time? Also, are there any files in the directory that will help explain why it's being created? – mfisch Aug 17 '12 at 16:55
  • I'll try to search out a solution - either for a log that might record the event (of the directory being created) or some type of notification. I'm not sure I'll ever be able to catch it red-handed with my under-focused attention. – Insperatus Aug 20 '12 at 05:56