Search code examples
linuxubuntumv

Where does `mv file.sh /~` move the file?


I moved a file with

mv file.sh /~

So I moved the file from the current directory to /~. However I have not idea what/where /~ is.


Solution

  • ~ has a special meaning only at the start of a word. Therefore, /~ is a file named ~ located in the topmost root directory.

    Normal user shouldn't be able to create files in the / directory. Be double careful when running with admin privileges and don't run commands you don't understand.