[英]Move a file to a directory that is within another directory and rename it in one command line?
So, we have a parent_dir and it contains a child_dir and a file1.所以,我们有一个 parent_dir,它包含一个 child_dir 和一个 file1。 How can I move a file1 to a child_dir and rename it as file2?如何将 file1 移动到 child_dir 并将其重命名为 file2? let's assume my pwd is /var让我们假设我的密码是 /var
You can just move a file from one dest.您可以只从一个目标移动文件。 to another (it changes its name):到另一个(它改变了它的名字):
mv /parent_dir/file1 /parent_dir/child_dir/file2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.