How Do You Use the Copy Command in the Linux Terminal?

Subscribers:
520
Published on ● Video Link: https://www.youtube.com/watch?v=H1mWpmhzly4



Duration: 2:23
25 views
1


cp (Copy) is a command used for copying files and directories in Linux.

🔥 GROW YOUR CAREER WITH LINUX ➡️ https://shareasale.com/r.cfm?b=734319&u=3115204&m=59485&urllink=&afftrack=
(Learn and get certified by the experts at the Linux Foundation with this affiliate link)

To copy a file with the cp command pass the name of the file to be copied and then the destination.

For example, by running the below-mentioned command will copy a file background.jpg to a Pictures/ directory.

cp background.jpeg Pictures/

If you want to copy the file under a different name, you need to specify the desired file name.

cp background.jpeg new-logo.jpeg

To copy multiple files, pass the names of files followed by the destination directory to the cp command.

cp new-logo.jpeg thisfile.txt ~/Documents/

To copy a directory, including all its files and subdirectories, use the -r (recursive) option.

For example, we are copying the directory Documents to Docs_bckp.

cp -r Documents/ Docs_bckp/


Support the Channel https://donorbox.org/virtual-assistant-for-linux
VAL utilises the following open source software.
GIMP for thumbnail.
Openshot for video editing.
Mimic for speech.
Kazam for screen recording.
Terminology for terminal emulator.
Featherpad for text editor.
Midnight Commander for managing files.
MX Linux operating system.







Tags:
LINUX
OPEN SOURCE
TERMINAL
COMMAND LINE
COMPUTER
LAPTOP
HOW TO
TECH
TECHNOLOGY
SOFTWARE
HARDWARE
OPERATING SYSTEM