970K Subscribers . 665K Views
Welcome to the video - "How to copy file Centos Linux Centos | Linux Full Tutorial 2020 "
In CentOS Linux, you can copy files using the cp command. Here are the steps to follow:
1) Open a terminal window or log in to the system using SSH.
2) Navigate to the directory where the file you want to copy is located. For example, if the file is located in the /home/user/documents/ directory, type:
cd /home/user/documents/
3) Run the following command to copy the file to a new location:
cp filename /path/to/new/location/
Replace filename with the name of the file you want to copy and /path/to/new/location/ with the path to the new location where you want to copy the file.
For example, to copy the file document.txt to the /home/user/documents/backup/ directory, type:
cp document.txt /home/user/documents/backup/
4) If you want to copy an entire directory and its contents, you can use the -r option to enable recursive copying. For example, to copy the entire /home/user/documents/ directory to the /home/user/backup/ directory, type:
cp -r /home/user/documents/ /home/user/backup/
5) This will copy the documents directory and all its contents to the backup directory.
Wait for the copy process to complete. This may take some time depending on the size of the file or directory being copied.
That's it! You have successfully copied a file or directory in CentOS Linux using the cp command.
This Video is for beginners Keep watching
Please Subscribe and click the notification bell so you never miss a video
Thank You For Watching
#LinuxFullTutorial2020
#LinuxTipsandTricks2020 #LinuxServer #LinuxTeachingHouse