LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-14-2011, 10:47 PM   #1
ankiiit
LQ Newbie
 
Registered: Aug 2011
Location: India
Distribution: Centos, Redhat, Fedora
Posts: 12

Rep: Reputation: Disabled
Some issues with the cp command


Dear Mentors,

Please brief me about the following :-

1) When I try the following command:-

cp -r /etc/pa* ./abc

note:- abc is not existent at this point

I get the error abc is not a directory.

but when i try the following command it works.

cp -r /etc ./abc

I am confused, why the first command isn't working.

Any help in this regard would be appreciated.

Thanks in Advance
Ankit
 
Old 12-15-2011, 06:18 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
In first command you tell cp to copy /etc/pa* files, dirs into ./abc
In second command you tell cp to copy /etc as ./abc

man cp
Code:
DESCRIPTION
       Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
 
Old 12-17-2011, 07:56 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Resolution Issues K_REY_C Linux - Hardware 11 08-06-2010 05:37 AM
[SOLVED] Issues with the rm command ripvtech Linux - Newbie 9 09-07-2009 09:41 PM
Password issues with useradd command mcaywood Linux - Newbie 2 11-27-2007 04:29 PM
CHMOD Command Issues ecko! Linux - Newbie 3 09-19-2006 11:22 AM
Command line network config issues gigi1234 Linux - Networking 4 08-25-2006 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration