The UNIX and Linux Forums  


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



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
uuencode for attachment giving problem manojram UNIX Desktop for Dummies Questions & Answers 3 11-19-2008 08:20 PM
^p not giving command line history. akbar SUN Solaris 0 02-21-2008 01:15 PM
mv command is giving error in shell script gammit Shell Programming and Scripting 5 12-13-2007 03:56 AM
Export command giving Variable Name vs the Value set for the Variable ParNone UNIX for Dummies Questions & Answers 2 04-03-2006 12:43 PM
find command not giving file names accord. to timestamps thanuman UNIX for Dummies Questions & Answers 8 09-07-2004 10:04 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-10-2008
anishshahnew83 anishshahnew83 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 1
Simple cp command giving problem..HELP !!!

i am new user to unix. just started today. i have a task on my hand. please help me out.this may be the most simplest question to you guys.

i have to upload a file ABC in some directory for example lib..i am already at the promt where i want to load that directory

now my destination directory i.e. the directory i want to copy is in home/username/Desktop/XYZ

i try giving this command:
$ cp /home/username/Desktop/XYZ .

but it doesnt work ...please help...
thank you
  #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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0