From owner-freebsd-questions@FreeBSD.ORG Tue Dec 6 11:20:47 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 D0D0416A41F for ; Tue, 6 Dec 2005 11:20:47 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B29A43D49 for ; Tue, 6 Dec 2005 11:20:45 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-8) with SMTP id jB6BKdas029484; Tue, 6 Dec 2005 13:20:40 +0200 Received: by flame.pc (Postfix, from userid 1001) id 9251711562; Tue, 6 Dec 2005 13:19:56 +0200 (EET) Date: Tue, 6 Dec 2005 13:19:56 +0200 From: Giorgos Keramidas To: user@dhp.com Message-ID: <20051206111956.GA1602@flame.pc> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-questions@freebsd.org Subject: Re: 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: Tue, 06 Dec 2005 11:20:47 -0000 On 2005-12-05 17:56, user wrote: > > 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 I very often find that I want to move around huge trees, including mostly source code, but compiled object code too. One of the most useful tricks for moving entire hierarchies is to use cpio(1): $ cd ~/branches/foo $ find . | cpio -p -dmvu ~/branches/bar This is guaranteed to work with thousands of files, regardless of the current shell, UNIX version or current per-process user limits :) > - 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 ? Nothing. The limits are there for a good reason. To avoid letting a rogue process that leaks memory like mad to bring the entire system to a halt for lack of free memory :)