terminal copy folder code example

Example 1: copy all files from a folder to another ubuntu

cp -a ./source/. ./dest/

Example 2: mac clone directory duplicate

# Is there something special with that directory or are you really just asking how to copy directories?
# Copy recursively via CLI:

cp -R <sourcedir> <destdir>

Example 3: mac copy folder terminal

cp -R ~/Documents/Expenses /Volumes/Data/Expenses

Example 4: how to move file in the command line

% mv ~/Downloads/MyFile.txt ~/Documents/Work/MyFile.txt

Example 5: terminal copy directory

$ cp -R <source_folder>/* <destination_folder>