So, we have a parent_dir and it contains a child_dir and a file1. How can I move a file1 to a child_dir and rename it as file2? let's assume my pwd is /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
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.