Ubuntu move and copy folders (files) to another folder

1. Move a folder to another folder

$ sudo mv 文件夹名 目标文件夹路径

note:

This command must be executed in the directory of the folder to be moved, and there can be no folders and files in the folder
 

2. Copy a folder to another folder

$ sudo cp -r 文件夹名 目标文件夹路径 

-r It means recursive, the same is added when deleting-r

note:

The command must be executed in the directory of the file to be moved, there can be folders or files in the folder

Guess you like

Origin blog.csdn.net/weixin_43901865/article/details/112987196