Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-21-2003, 12:48 PM   #1
Senior Member
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
'cp' command error

This is what I do and get:

[ken@localhost Jazz]$ cp /mnt/cdrom/*.*
cp: copying multiple files, but last argument `/mnt/cdrom/Thelonius Monk & John Coltrane - Epistrophy.mp3' is not a directory
Try `cp --help' for more information.

Just wondering why it's telling me this. I'm just trying to copy everything on my Jazz MP3 CD to my hard drive. I eventually just did it in KDE, but I would like to try to do things via the console.

Old 12-21-2003, 12:52 PM   #2
Registered: Dec 2003
Location: Layer 7 =D
Distribution: Slackware, LFS, Rock Linux
Posts: 165

Rep: Reputation: 30
you need to specify a valid destination...
cp /mnt/cdrom/* /path/
if you also wan't to to copy directorys, you must add the -r option (recurse)
cp -r /mnt/cdrom/* /path/

well, try
man cp
Old 12-21-2003, 04:51 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
In addition to posion's explanation you need
to understand how the bash handles wildcards.
Those aren't handled by cp, but by the shell.

That is, if you specify something like /mnt/cdrom/*.*
the shell will build a list of files, and since you omitted
the destination on the command-line, cp will then
assume that the last file of that list is the target for
your copy-process ....



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where i can get source code of the 'cp' command? chaits Linux - General 5 11-22-2010 10:50 PM
'cp' and 'rm' don't act upon hidden files? Rodolfo Medina Linux - General 2 09-26-2005 07:18 AM
Preserving number of links with 'cp'. ( preserve number of links ) Devyn Linux - General 7 09-16-2005 11:07 PM
Error Using rm Command suchi_s Linux - General 15 05-29-2004 01:33 AM
High CPU usage and lag when using 'cp' homestead1000 Linux - Software 1 07-19-2003 01:02 AM > Forums > Linux Forums > Linux - Newbie

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

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