The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-10-2008
rajut1984 rajut1984 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 3
Hi ,

Use the below commands for copy ..

To copy a file

cp <source_file> <new_file_name>
----------------------------------------

To copy a complete directiory

cp -r <source_dir> <new_dir_name>

=============================


In your case


To copy the complete XYZ dirctory (including all files present under that dir)..

cp -r /home/username/Desktop/XYZ .

-----------------------------------

To copy a file


cp /home/username/Desktop/XYZ/<file_name> .


Note: -r means recursive copy