2

I'm trying to move a folder into another folder in terminal, but when I enter this line:

mv South_America /North_America

South_America just completely disappears. It didn't move into the North_America folder? or go into my trash.

How do I move a folder?

user399138
  • 21
  • 1
  • 1
  • 2
  • 1
    `/North_America` may not be what you intended. – muru Apr 18 '15 at 04:36
  • 1
    @muru I think that would be the answer link, not a duplicate. – TheWanderer Apr 18 '15 at 04:38
  • 3
    There's small point that interests me: OP would receive message something like `mv: cannot move Sourth America to /North\ America: Permission denied`, if done without sudo, right ? and if he did is with sudo, then the `/North\ America` folder would be created , right ? I mean, i tested this with empty folder just now, same syntax as OP, so, I guess OP's files are safe and sound in that `/North\ America` directory – Sergiy Kolodyazhnyy Apr 18 '15 at 07:20

2 Answers2

5

you are doing it wrong, you are trying to move a file inside / folder without root permissions

for you try getting your current directory by

pwd

and then try moving the files using

mv <folder to move> <destination>

try using relative locations ie:

mv /home/<user>/South_America /home/<user>/North_America/

for more information about the mv command type in the terminal

man mv

or

mv --help
bolzano
  • 1,540
  • 14
  • 24
2

mv South_America /North_America will move a folder called South_America on your current directory to a folder called North_America on your root folder (/).

To avoid this, you don't need to put a slash (/) before the second path.

0x2b3bfa0
  • 8,620
  • 5
  • 38
  • 59