command to copy file in ubuntu code example

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

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

Example 2: cp multiple files

cp file1 file2 file3 /home/usr/destination/

Example 3: copy file in linux command line

cp [OPTION] Source Destination
cp [OPTION] Source Directory
cp [OPTION] Source-1 Source-2 Source-3 Source-n Directory

Example 4: ubuntu copy

cp origin destin

#example
cp /home/me/test.zip /home/me/destin/

Example 5: how to copy file in ubuntu terminal

cp ~/Downloads/your-file.txt ~/Documents/

Tags:

Misc Example