From owner-freebsd-questions@FreeBSD.ORG Wed Aug 31 23:21:09 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 AA2E116A41F for ; Wed, 31 Aug 2005 23:21:09 +0000 (GMT) (envelope-from mikes@siralan.org) Received: from rader.servnow.com (rader.servnow.com [69.93.129.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53B7543D45 for ; Wed, 31 Aug 2005 23:21:09 +0000 (GMT) (envelope-from mikes@siralan.org) Received: from 12-210-221-89.client.insightbb.com ([12.210.221.89] helo=familysquires.net) by rader.servnow.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52) id 1EAbt7-0000Lf-D4; Wed, 31 Aug 2005 19:21:01 -0400 Date: Wed, 31 Aug 2005 18:21:07 -0500 (EST) From: "Michael L. Squires" X-X-Sender: mikes@familysquires.net To: Brian John In-Reply-To: <433DBEC0.1030001@fusemail.com> Message-ID: <20050831181255.M85734@familysquires.net> References: <433DBEC0.1030001@fusemail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rader.servnow.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - siralan.org X-Source: X-Source-Args: X-Source-Dir: 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: Wed, 31 Aug 2005 23:21:09 -0000 I use tar cvf //.tar 1 3 4 5 6 7 8 9 10 cd tar xvf //.tar I usually do cd find . ! -type d -print > files.txt vi files.txt - edit out files I don't want tar cvfT //.tar files.txt cd tar xvf //.tar which lets me copy files beginning with "." in the root of the directory (tar will skip these in the root, copies them in subdirectories). You also have to worry about permissions if there are executables or files you don't own in the directory. There are much neater ways of doing this, but this method leaves a backup copy in the tar file. Mike Squires On Fri, 30 Sep 2005, 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? What > if I wanted to move everything but directories 2 and 7? > > I'm not sure how to use the mv command to do this in 1 comand. > > Thanks > > /Brian > _______________________________________________ > 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" > >