-   Linux - General (
-   -   cp error (

tlgill 11-24-2000 03:15 PM

I have been trying to complete a "cp" (copy) command (with a * wild card) on RH 6.1 for the last week. I confirm my current directory (by pwd) to make sure I am in the (sub)directory that holds the files I want to copy. I also check the receiving device and directory (to make sure it is there (properly mounted) and ready to receive the files). I am trying to copy over 3500 files from "/abc/work" to another "/mnt/jaz" so copying them one at a time isn't an answer. I don't need all the files in the /abc/work directory so copying the whole subdirectory is not an option either.

My string looks like

cp -v /abc/work/*.filename /mnt/jaz/directoryname

So, copy (verbose so I can see what is going on, IF something happens) (from) /abc/work/(all the file names that end the same way) to (my jaz drive that is mounted in the /mnt/jaz sub-directory) into the "directoryname" directory" with the orginal filenames

I have looked the command up in several books and the "man" pages to make sure I am writing the command properly. I have shown it to several other Linux users. So far I can't seem to figure out what I am doing wrong.

I HAVE been able to copy the files one at a time, using the whole path & file name.

Any ideas?

CragStar 11-26-2000 03:41 PM

What is the error message you get? Is it regarding not finding a file to copy or destination not set?

tlgill 11-27-2000 06:26 AM

cp error
The error message is:

bash: /bin/cp: Arguement list too long

I get the same message (except replace cp with mv) when I try to move files

Any suggestions?

CragStar 11-27-2000 02:21 PM

You could try using the command dd to copy the files across. It would look like this:
#dd if=/abc/work/*.filename of=/mnt/jaz/directoryname

However it sounds as if it doesn't like copying that many files all at once. Could you limit the files copyed in one go by adding letters in before the extension?

I am not too sure of the dd command, the manual page will be alot more useful (#man -dd). I no success post back the error message.

All times are GMT -5. The time now is 12:37 PM.