简体   繁体   English

Ubuntu-MV:移动目录

[英]Ubuntu - mv: moving a directory

I'm still new to Ubuntu and the commands... and i'm trying to move jdk1.7.0_02 directory to a file/directory path using this command.. 我仍然是Ubuntu和命令的新手...并且我正在尝试使用此命令将jdk1.7.0_02目录移动到文件/目录路径。

sudo mv ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0

i've already uncompressed a zipped jdk7u2 folder using the sudo command. 我已经使用sudo命令解压缩了一个压缩的jdk7u2文件夹。 it extract into the jdk1.7.0_02 directory 提取到jdk1.7.0_02目录

i even went to this Examples of mv commands 我什至去了mv命令的例子

http://unixhelp.ed.ac.uk/tasks/mv2.html http://unixhelp.ed.ac.uk/tasks/mv2.html

so i tried this: 所以我尝试了这个:

sudo mv jdk1.7.0_02 ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0

got this error: 得到这个错误:

mv: cannot move ‘jdk1.7.0_02’ to ‘./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0’: No such file or directory

so please anyone can help me understand and solve this... thanks so much :D 所以请任何人都可以帮助我理解和解决此问题...非常感谢:D

mv takes two arguments source and destination. mv需要两个参数source和destination。 sudo mv ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0 command has no destination. sudo mv ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0命令没有目标。 sudo mv jdk1.7.0_02 ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0 in this command you are moving directory inside itself. sudo mv jdk1.7.0_02 ./jdk1.7.0_02/usr/lib/jvm/jdk1.7.0 ,您正在内部移动目录。 Consider cutting a directory in Windows and pasting it by going inside that. 考虑在Windows中剪切目录并将其粘贴进去。 That is exactly what you are doing. 那正是你在做什么。 What you should rather do is something like sudo mv jdk1.7.0_02 jdk1.7.0 . 您宁愿执行的操作类似sudo mv jdk1.7.0_02 jdk1.7.0 That makes source and destination separate and not overlapping. 这使源和目标分离并且不重叠。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM