0

In my Downloads folder when I run ls I see the home directory, and I don't know why, I want to remove it but I am afraid to remove my home folder. Can anyone tell me how I can just remove the home directory in the Downloads folder and keep it in the root folder ?

here you can see a picture of what I get when I run ls command in the Downloads directory:

enter image description here

when I run the command:ls -la this what I get:

-rw------- 1 root root 1024 nov 28 20:24 ~

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
rainman
  • 149

1 Answers1

1

You are seeing a file named ~ in the Downloads directory; that symbol also happens to refer to your home directory, when used at the beginning of an unquoted string (here is what bash does).

To remove the file, you have many options; here are two of the simplest:

rm ~/Downloads/~
cd ~/Downloads && rm ./~

Add the -i flag to any of the rm commands to have it prompt you before removing the file.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255