[英]ubuntu mv file disappeared
On ubuntu , I have the following directory structure: 在ubuntu上 ,我具有以下目录结构:
/var/www/html
I am in www
and I decided to move a file from this directory to html
. 我在
www
,因此决定将文件从此目录移动到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. 当您需要移动文件时,需要执行以下操作:“ mv foo〜/ Desktop”,您忘记了〜符号。 What mv does is also rename the file.
mv所做的也是重命名文件。
The mv command will move a file to a different location or will rename a file.
mv命令会将文件移动到其他位置或重命名文件。 Examples are as follows: "mv file foo" will rename the file "file" to "foo".
示例如下:“ mv file foo”会将文件“ file”重命名为“ foo”。 "mv foo ~/Desktop" will move the file "foo" to your Desktop directory, but it will not rename it.
“ mv foo〜/ Desktop”会将文件“ foo”移动到您的桌面目录,但是不会重命名。 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. 您应该看看您是否可以在根目录中找到一个名为html的文件夹。
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
是的,您的文件现在称为
html
,并且位于根目录/
(我什至不确定这是不可能的),或者它已移至现有目录/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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.