[OT] Argument list too long
Thomas Kaiser (ubuntu)
ubuntu at kaiser-linux.li
Fri Aug 12 16:56:02 UTC 2005
Andrew Millar wrote:
> Try copying them a few at a time; maybe try using:
>
> cp -r /media/nethd/Sound/a* /media/Sound/
> cp -r /media/nethd/Sound/b* /media/Sound/
>
> and so on.
>
> That should break the argument list down and allow you to copy it
>
> - Andy
>
>
> Thomas Kaiser (ubuntu) wrote:
>
>> Hello All
>>
>> 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
>>
>> So, I tried rsync:
>>
>> thomas at AMD64:~$ rsync -rvtn --modify-window=1 --exclude "lost+found"
>> /media/nethd/Sound/* /media/Sound
>> bash: /usr/bin/rsync: Argument list too long
>>
>> Any help?
>>
>> Regards, Thomas
>>
>
Andrew Millar wrote:
> cp -r /media/nethd/Sound/a* /media/Sound/
I tried this and it works.
Can I do something like (pseudo code):
foreach (abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)
cp -r /media/nethd/Sound/$_* /media/Sound/
next
I am not a bash programmer but I heard/read that you can do stuff like
this in the batch
Regards, Thomas
> --
http://www.kaiser-linux.li
--
http://www.kaiser-linux.li
More information about the ubuntu-users
mailing list