On ubuntu , 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?
When u need to move a file you need to do this like: "mv foo ~/Desktop", You forgot the ~ sign. What mv does is also rename the file.
The mv command will move a file to a different location or will rename a file. Examples are as follows: "mv file foo" will rename the file "file" to "foo". "mv foo ~/Desktop" will move the file "foo" to your Desktop directory, but it will not rename it. You must specify a new file name to rename a file.
You should look if u can find a folder called html in the root.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.