Sounds like you haven't moved it to a new folder, you've renamed the file to ~
.
Try mv '~' foo
. mv
is used to move and rename files. Next time try mv foo /home/user/
. That should do the trick.
How to retrieve a misplaced file in Centos 6.2
Question
So I'm rather new to linux and made a dumb mistake. I've moved a file that is needed by a program to a temporary folder called ~ in the / directory. My intention was to move it into the user directory ~ but for some reason, it created... I'm guessing a file called ~. I'm trying to get the file that was mv into this folder or directory. When I try to cd ~ I am moved into the user "~" and not the recently created ~. I have no idea how to access this new type of file. please help! This the file in the root directory that I'm trying to acess as its seen in putty
-rw-r--r--. 1 root root 67 Sep 11 12:10 ~
La solution
Autres conseils
That ls
output seems to indicate that ~
is not a directory but a regular file. You should be able to rename it:
mv '~' foo
And then do whatever you like with foo
.