I had two folders in the same directory and I wanted to move one into other with the command mv foo /foo2. But now foo has vanished.


If the above command terminated without a Permission Denied error, it means you had root privileges when you ran it and it actually moved the directory foo into the directory /foo2, which is not foo2 in the current directory, but foo2 under the root directory (/).

You'll want to do

mv /foo2 foo2

in the directory where you issued the original command.

  • yep just found it - i forgot it would end up in / – cea Jun 7 '14 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.