-1

running ls

I have never seen my home directory in my home directory until recently. Is this something I need to be worried about? I do not know if this is something problematic.

3
  • What's inside it? As Marcus has said, it's just a directory called ~ and was probably created by something/someone who quoted it (eg mkdir -p "~/foo"), thus preventing shell expansion. The contents might point towards the mechanism for creation. Commented Jun 23, 2024 at 20:52
  • There's a Desktop directory, and inside that a temp_chrome directory. Commented Jun 23, 2024 at 21:05
  • Try ls -ld ~/~ Commented Jun 24, 2024 at 4:42

1 Answer 1

0

That's not your home directory, that's a directory with the name ~.

(the ~ being a shorthand for the content of $home is just something that exists because your shell invents it - it always gets translated to an actual path under the hood. Try print ~ to see what I mean – print doesn't do any path resolution, it's your shell that already expands ~ to the full path of your home directory before it passes it on to a function like print (or any other function).)

So, no, you don't need to worry. Chances are, that ended up there accidentally when you (or some other programmer) used a function that creates directories that are missing with something like ~/newfile; since only the shell expands ~ when you type it, that would just refer to a file in a directory literally called ~.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.