ubuntu
Copy a directory along with its content to another directory in Ubuntu
To copy a directory or folder to a location in Ubuntu you can use cp command. It will copy the directory along with its content to the target location.
# If directory does not exist in the target location
------------------------------------------------------
cp -r /path/to/directory /path/to/folder
# Copy a directory with a new directory name
------------------------------------------------------
cp -r /path/to/directory /path/to/folder/NEW_DIR_NAME
Was this helpful?
Similar Posts
- Copy all folder content to another folder In Ubuntu
- Change directory name or rename a directory in Ubuntu
- Create a new directory or folder in Ubuntu
- Remove or Delete a folder or directory in Ubuntu
- Find all empty directories in a directory in Ubuntu
- Delete all empty directories in a directory in Ubuntu
- Get total size of a directory or folder in Ubuntu