From owner-freebsd-questions@FreeBSD.ORG Tue Feb 7 22:10:47 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7039F106564A for ; Tue, 7 Feb 2012 22:10:47 +0000 (UTC) (envelope-from bsdlisten@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 029BD8FC18 for ; Tue, 7 Feb 2012 22:10:46 +0000 (UTC) Received: by eaan10 with SMTP id n10so3556600eaa.13 for ; Tue, 07 Feb 2012 14:10:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=wunjePYZzYHVTjzV51QSN5QuVnNPA1JdNRYa1cYPG/w=; b=A9i+0LbX6iV11F7/bY2kpozriE7pQow8sxzVbMWtuXqiWXjkdANH32oDSLFIf8NDWD /uctGVxVOnC8RrcRl8Uy5QHzppo24uBRYDQ8h4yNFKOiU/EKZh0kHFT2urcv4hS2kvbL GISJclCFwVnb3tFg0TJ/oddDoz6oND3I5CMzk= Received: by 10.14.96.11 with SMTP id q11mr7641423eef.98.1328652644807; Tue, 07 Feb 2012 14:10:44 -0800 (PST) Received: from [192.168.0.105] ([89.47.83.116]) by mx.google.com with ESMTPS id o49sm78267911eei.0.2012.02.07.14.10.42 (version=SSLv3 cipher=OTHER); Tue, 07 Feb 2012 14:10:43 -0800 (PST) Message-ID: <4F31A15C.3050506@gmail.com> Date: Wed, 08 Feb 2012 00:10:36 +0200 From: Rares Aioanei User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: =?windows-1251?Q?=CA=EE=ED=FC=EA=EE=E2_=C5=E2=E3=E5=ED=E8=E9?= References: <1237723287.20120207235924@yandex.ru> In-Reply-To: <1237723287.20120207235924@yandex.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: 'rm' Can not delete files 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, 07 Feb 2012 22:10:47 -0000 On 02/07/2012 11:59 PM, Коньков Евгений wrote: > # rm * > /bin/rm: Argument list too long. > > > in this directory about 25000 files, > but actually there is only one argument to rm it is '*' sign. > > Why rm get list of all files in directore instead of deleting one by one? > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > AFAIR, the shell expands * to every match , so from this point of view it is equivalent to the 25000 files. Try 'rm -f [a-d]*' , then [e-h]* or similar until you get them all. Best, -- Rares Aioanei