cp terminal code example

Example 1: 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  

Example 2: how to move file in the command line

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

Example 3: copy command in linux

move command : mv filename dirname
remove command : rm -r filename
copy command : cp filename dirname
zip command : zip -r filename.zip foldername
unzip command : unzip filename.zip -d dirname

Example 4: copier un répertoire et son contenu sous linux

cp -R SOURCE DESTINATION

Tags:

Misc Example