From owner-freebsd-questions@FreeBSD.ORG Thu Apr 8 09:55:25 2004 Return-Path: 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 079E416A4D0 for ; Thu, 8 Apr 2004 09:55:24 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64E2F43D55 for ; Thu, 8 Apr 2004 09:55:16 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i38GtCK1095635; Thu, 8 Apr 2004 11:55:12 -0500 (CDT) (envelope-from dan) Date: Thu, 8 Apr 2004 11:55:12 -0500 From: Dan Nelson To: Peter Risdon Message-ID: <20040408165511.GD8182@dan.emsphone.com> References: <40757879.1010307@circlesquared.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40757879.1010307@circlesquared.com> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: FreeBSD Question List Subject: Re: Pipes and commands that require two arguments X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 16:55:25 -0000 In the last episode (Apr 08), Peter Risdon said: > I'm stuck with this, so hope nobody will mind the fact that is isn't > strictly a FreeBSD question. > > I want to redirect the output of a command to mv(1) as the source > file, and specify somehow a destination directory. Basically, I have > to move several thousand files whose names match a number of patterns > to a single directory. The xargs manpage has an example that should get you on the right track: /bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir -- Dan Nelson dnelson@allantgroup.com