[OT] Argument list too long

Lee Braiden lee_b at digitalunleashed.com
Fri Aug 12 16:48:56 UTC 2005


On Friday 12 August 2005 17:18, Thomas Kaiser (ubuntu) wrote:
> I try to copy my mp3's (108GB) from a nethd to the local hd on my box.
> Nautilus just stops copy after some times (no message, just stops). So I
> tried it on the command line with cp and got:
>
> thomas at AMD64:~$ cp -r /media/nethd/Sound/* /media/Sound/
> bash: /bin/cp: Argument list too long

As you've discovered, you can't just fill the command line with huge lists of 
files; I think the maximum is 32000 characters, or something like that.  You 
can use find for this, though.  Something like the following (if I remember 
the syntax correctly):

  find /media/nethd/Sound/ -iname '*.mp3' -exec cp \{\} /media/Sound/ \;

-- 
Lee Braiden
http://www.DigitalUnleashed.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050812/2d1a6148/attachment.sig>


More information about the ubuntu-users mailing list