Ubuntu move and copy folder (file) to another folder

1. Move a folder to another folder

$ sudo mv folder name target folder path

Notice:

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

2. Copy a folder to another folder

$ sudo cp -r folder name target folder path

-rIt means recursion, and the same is true when deleting-r

Notice:

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

Leave a Comment

Your email address will not be published. Required fields are marked *