Search code examples
fileunixubuntumv

ubuntu mv file disappeared


On , I have the following directory structure:

/var/www/html

I am in www and I decided to move a file from this directory to html. I executed the following:

mv myfile.iso /html

Now I cannot see the file. Apparently I did not use the command properly. Any help to recover the file?


Solution

  • Yeah, your file is either now called html, and it stands in the root directory / (I'm not even sure this is possible), or it moved to existing directory /html

    You must do the following to find it back (second case I spoke of):

    mv /html/myfile.iso /var/www/html
    

    or if it doesn't work (first case):

    mv /html /var/www/html/myfile.iso