In today’s article I will cover Copy Files from Linux.
With the help of this command, you can copy the file in the specified directory to any directory or the directory you are in with a different name. In my previous article, we created a text file named textfile, let’s change its name to text1 with the cp command.
General usage:
cp copy_request_filename file to rename
1 |
cp textfile text1 |
With the help of the cp command above, we copied the textfile with a new name called text1.
This time, we will add the -r parameter when we want to copy the linuxlearning file in the same directory.
cp -r the file you want to copy directory to copy
1 |
cp -r learninglinux/ /home/farukerdem/Downloads/ |