cp command under a Linux, UNIX-like, and BSD like operating systems is used to copy files and directories .
cp is the command entered in a Unix and Linux shell to copy a file from one place to another, possibly on a different filesystem.
The original file remains unchanged, and the new file may have the same or a different name.
cp Command Syntax
cp SOURCE DEST
- 42Welcome to the Linux Knowledge Base and Tutorial so you want to learn how to use the Bash command line interface (terminal) on Unix/Linux. Or, it's part of a subject you're doing and so you're learning it because you have to. Either way, that's great. You're learning how to use…
- 34Searching Inside the File/Files in Linux grep prints the matching lines Let's have some example to understand this: Example 1: To Search for the given string in a single file Let me create a file eduguru.sh. $ cat eduguru.sh #!/bin/bash fun() echo "This is a test." # Terminate our shell script with success…
- 33cd : Change Directory The cd command, which stands for "change directory", changes the shell's current working directory. It is a builtin command, which means that it is executed directly by your shell, instead of launching an external program. cd is a command-line OS shell commandused to change the current working directory…