Skip to content
Facebook-f Twitter Linkedin-in Youtube Rss
  • 1.646.775.2855
  • 91. 93536 44646
  • VPS control
  • Client Area
Medha Hosting Logo
  • HOME
  • SERVERS
    • DEDICATED SERVERS
    • VPS SERVERS
    • COLOCATION SERVICES
    • Email & Security
      • Email And Collaboration
        • Microsoft Office 365 – India
        • Microsoft Office 365 – US & Canada
        • Google G Suite – US & Canada
        • Google G Suite – India
      • SSL Certificates
  • SERVER MANAGEMENT
    • MICROSOFT SERVER SUPPORT
      • EXCHANGE SERVER SUPPORT
      • WINDOWS SERVER SUPPORT
      • MS SQL SERVER SUPPORT
      • MS IIS SERVER SUPPORT
      • MS SHAREPOINT SERVER SUPPORT
    • LINUX SERVER SUPPORT
      • CPANEL SERVER SUPPORT
      • DIRECTADMIN SERVER SUPPORT
      • VPS MANAGEMENT
      • VMWARE SERVER SUPPORT
      • PLESK SERVER SUPPORT
  • MANAGED IT SERVICES
    • Managed Cloud
      • GOOGLE CLOUD
      • AZURE CONSULTING
      • VIRTUALIZATION
      • AWS CONSULTING
      • OFFICE 365 MIGRATION
    • Managed Hosting
    • Professional Services
      • 365 X 24 X 7 NOC
      • LINUX ADMINISTRATION
      • PATCHING
      • HIGH AVAILABILITY SOLUTIONS
      • WINDOWS ADMINISTRATION
      • NETWORK ADMINISTRATION
      • APPLICATION SERVER MANAGEMENT
    • White Label Managed IT Services
  • ABOUT US
    • DATA CENTERS
    • LOCATIONS
      • New York City
      • Atlanta
      • Dallas
      • Houston
      • Chicago
      • Orlando
      • Calgary
      • Sydney
      • London
      • Dublin
      • Singapore
    • OUR PARTNERS
    • FAQS
    • AFFILIATES
    • CAREERS
    • CONTACT US
    • BLOG
      • Write For Us
Menu
  • HOME
  • SERVERS
    • DEDICATED SERVERS
    • VPS SERVERS
    • COLOCATION SERVICES
    • Email & Security
      • Email And Collaboration
        • Microsoft Office 365 – India
        • Microsoft Office 365 – US & Canada
        • Google G Suite – US & Canada
        • Google G Suite – India
      • SSL Certificates
  • SERVER MANAGEMENT
    • MICROSOFT SERVER SUPPORT
      • EXCHANGE SERVER SUPPORT
      • WINDOWS SERVER SUPPORT
      • MS SQL SERVER SUPPORT
      • MS IIS SERVER SUPPORT
      • MS SHAREPOINT SERVER SUPPORT
    • LINUX SERVER SUPPORT
      • CPANEL SERVER SUPPORT
      • DIRECTADMIN SERVER SUPPORT
      • VPS MANAGEMENT
      • VMWARE SERVER SUPPORT
      • PLESK SERVER SUPPORT
  • MANAGED IT SERVICES
    • Managed Cloud
      • GOOGLE CLOUD
      • AZURE CONSULTING
      • VIRTUALIZATION
      • AWS CONSULTING
      • OFFICE 365 MIGRATION
    • Managed Hosting
    • Professional Services
      • 365 X 24 X 7 NOC
      • LINUX ADMINISTRATION
      • PATCHING
      • HIGH AVAILABILITY SOLUTIONS
      • WINDOWS ADMINISTRATION
      • NETWORK ADMINISTRATION
      • APPLICATION SERVER MANAGEMENT
    • White Label Managed IT Services
  • ABOUT US
    • DATA CENTERS
    • LOCATIONS
      • New York City
      • Atlanta
      • Dallas
      • Houston
      • Chicago
      • Orlando
      • Calgary
      • Sydney
      • London
      • Dublin
      • Singapore
    • OUR PARTNERS
    • FAQS
    • AFFILIATES
    • CAREERS
    • CONTACT US
    • BLOG
      • Write For Us

In this post we will see how to copy Files using terminal commands in CentOS. CentOS is a Community Enterprise operating system which mainly focuses on the server. It is a part of Linux Operating System Distribution and it is free to use. First open the terminal.

Total Time Needed: 30 minutes

Required Tools:

CentOS

Steps to Copy Files and Directories in CentOS

Step 1 : Copy Files
To copy files use the command cp source destination. For example to copy a file 1.txt to directory dir4. Type the command cp 1.txt dir4 and press enter.
ZXVDSsvds
Step 2 : Copy Multiple Files:
To copy multiple files, use the same command as above with multiple sources. For example, to copy 2.txt, 3.txt, 4.txt to dir4. Use the paths, type the command cp /root/2.txt /root/3.txt /root/4.txt /root/dir4 and press enter.
ZVdVSsfvs
Step 3 : Copy Files to the Current Directory
To copy files to the current directory, use the command “cp source .” . For example, to copy file2 to the current directory type “ cp /root/file2 . “
ZX SVvsvvsd
Step 4 : Copy Directories
To copy Directories, use the command cp –r . For example, to copy dir5 to dirc type the command cp –r dir5 dirc and press enter.
Z Vsdvddwv
Step 5: Copy Directory to Current Directory
To copy directory to the current directory without using the destination, use the command “ cp-r source .“ For example, to copy directory dirA to current directory type, the command cp –r /root/dirA . And press enter.
zXVsdvfddf
Conclusion:
Hope you understand how to copy file and directories in CentOS. If you have any doubts, please contact Medha Hosting. Our LInux experts are available 24/7 to assist you.
Read Here: How To Archive And Extract Files In CentOS?

Need help? Call our support team 24/7 at +1 646-775-2855

Medha Hosting Logo

We are Medha hosting, Fast Growing Business IT Services Company with most talented people.

USA: 447 Broadway,2nd FL #196New York, NY 10013.
Phone +1 646 775 2855

India: #74, 7th Cross, Kirshna Garden Incity Layout, Chikka kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

Servers and Cloud
  • Dedicated Servers
  • VPS hosting
  • cPanel servers
  • Office 365
  • G Suite
Services
  • Server support
  • Managed IT services
  • Data Center migration
  • Application management
  • Cloud management
Get Started
  • Client area
  • Resources
  • Tutorials
  • Affiliates
  • Docs
About
  • About Medha Hosting
  • Customer stories
  • Blog
  • Careers
  • Brand Assets
Facebook-f Twitter Youtube Linkedin-in Rss
Payment Button

© 2019 All rights reserved

  • Terms of Service |
  • Privacy Policy |
  • AUP |
  • Service Level Agreement