From owner-freebsd-questions@FreeBSD.ORG Tue Aug 30 22:47:19 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 BE07216A41F for ; Tue, 30 Aug 2005 22:47:19 +0000 (GMT) (envelope-from mark@mkproductions.org) Received: from ylpvm29.prodigy.net (ylpvm29-ext.prodigy.net [207.115.57.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24F4E43D60 for ; Tue, 30 Aug 2005 22:47:15 +0000 (GMT) (envelope-from mark@mkproductions.org) Received: from pimout4-ext.prodigy.net (pimout4-int.prodigy.net [207.115.4.203]) by ylpvm29.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j7UMl5bS031599 for ; Tue, 30 Aug 2005 18:47:05 -0400 X-ORBL: [66.139.109.225] Received: from [192.168.1.25] (ppp-66-139-109-225.dsl.stlsmo.swbell.net [66.139.109.225]) by pimout4-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id j7UMlD8Q113562; Tue, 30 Aug 2005 18:47:14 -0400 Message-ID: <4314E1F1.6060207@mkproductions.org> Date: Tue, 30 Aug 2005 17:47:13 -0500 From: Mark Kane User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050816) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian John References: <433DBEC0.1030001@fusemail.com> In-Reply-To: <433DBEC0.1030001@fusemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: moving everything except a directory 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, 30 Aug 2005 22:47:19 -0000 Brian John wrote: > Say I am at ~ and I have 10 directories inside named 1, 2, 3, 4 ,5, 6, > 7, 8, 9 and 10. What command can I use to move everything but directory > 2? mv 1 3 4 5 6 7 8 9 10 new/ > What if I wanted to move everything but directories 2 and 7? mv 1 3 4 5 6 8 9 10 new/ > I'm not sure how to use the mv command to do this in 1 comand. man mv SYNOPSIS mv [-f | -i | -n] [-v] source target mv [-f | -i | -n] [-v] source ... directory -Mark