0

I typed a command to refactor my file from the current folder I was in to another folder.

What I wanted was: mv /var/backup /var/www/backup

However, I typed: mv /var/backup /var/www/

Now I can't seem to find my file anywhere! Is there a way I can recover it?

1
  • 4
    Have you looked in /var/www? It should be there as long as the /var/www directory existed. If it did not, your file has been renamed to /var/www. Commented May 11, 2014 at 15:28

1 Answer 1

1

If some error happened, mv prints an error message and returns a non-zero status.

If mv didn't print anything then the move happened as you wrote it:

  • If /var/www did not exist, then you renamed /var/backup to /var/www.
  • If /var/www was an existing directory, then you moved /var/backup to /var/www/backup.

If neither of these happened, then either you typed a different command or you (or someone else) did something else to those files afterwards.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.