cp/mv/etc : argument list too long ... I am sick of this
user at dhp.com
Mon Dec 5 14:56:29 PST 2005
Ok, so I have some big directories with lots of files. If I do mv or cp,
it always refuses, telling me:
cp: argument list too long
so, no problem ... I get creative with things like this:
for f in 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W
X Y Z ; do cp $f* /some/dir ; done
lame, but it works.
but now I have some dirs that the above does not even work on. One of the
numbers or one of the letters has too many files.
So I am sick of being childish and hacking up lame for loops just to copy
files. Two questions:
- what is the number of files that is too many ? (err... arguments)
- since I live in 2005, what can I do to my FreeBSD system to upgrade it
to handle the directories I have ? How do I fix this so I can do normal,
simple command lines instead of butchered ridiculous hacks like above ?
More information about the freebsd-questions