1

I used command scp text.txt root@*.*.*.*:/~ to move text.txt file to home directory of my server. but it instead make a ~ directory in / of my server I can't either remove or access it because when I run command cd /~ it assume it as cd /home/username.

MOHRE
  • 354

1 Answers1

5

O.k. assuming you want to keep that file/directory, first rename it to something more normal by:

# note you need to escape the ~ to make this work
sudo mv /\~ /text.cipher

Then you can either copy it away where you want it or remove it with:

# -r flag only if it is a directory
sudo rm -r /text.cipher

This is the safest way to approach it actually after the renaming you can check if it really was that file which got renamed or if you unintentionally renamed your user directory.

More information here

Videonauth
  • 33,815