From owner-freebsd-questions@FreeBSD.ORG Mon Dec 5 22:56:29 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A44A16A41F for ; Mon, 5 Dec 2005 22:56:29 +0000 (GMT) (envelope-from user@dhp.com) Received: from shell.dhp.com (shell.dhp.com [199.245.105.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A414243D46 for ; Mon, 5 Dec 2005 22:56:28 +0000 (GMT) (envelope-from user@dhp.com) Received: by shell.dhp.com (Postfix, from userid 896) id 001EE31364; Mon, 5 Dec 2005 17:56:22 -0500 (EST) Date: Mon, 5 Dec 2005 17:56:22 -0500 (EST) From: user To: freebsd-questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: cp/mv/etc : argument list too long ... I am sick of this X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2005 22:56:29 -0000 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 ? thanks.