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?

3
  • 1
    /North_America may not be what you intended.
    – muru
    Apr 18, 2015 at 4:36
  • 1
    @muru I think that would be the answer link, not a duplicate. Apr 18, 2015 at 4: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 Apr 18, 2015 at 7:20

2 Answers 2

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
1
  • When I entered mv South_America North_America it worked!
    – user399138
    Apr 20, 2015 at 17:20
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.

Not the answer you're looking for? Browse other questions tagged .