From owner-freebsd-questions@FreeBSD.ORG Fri Mar 4 20:50:09 2005 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 C7AD516A4CE for ; Fri, 4 Mar 2005 20:50:09 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id C21F343D39 for ; Fri, 4 Mar 2005 20:50:07 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a172.otenet.gr [212.205.215.172]) j24Kngen000756; Fri, 4 Mar 2005 22:49:43 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j24Knno3000926; Fri, 4 Mar 2005 22:49:49 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j24KnjWE000925; Fri, 4 Mar 2005 22:49:45 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 4 Mar 2005 22:49:45 +0200 From: Giorgos Keramidas To: Joachim Dagerot Message-ID: <20050304204944.GC753@gothmog.gr> References: <200503042035.j24KZCMv023724@mail-core.space2u.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503042035.j24KZCMv023724@mail-core.space2u.com> cc: freebsd-questions@freebsd.org Subject: Re: Moving a directory hierarchy - best practice? 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: Fri, 04 Mar 2005 20:50:09 -0000 On 2005-03-04 21:35, Joachim Dagerot wrote: > > I have spent 20 minutes or so googling around to find the best way to > _move_ a complete directory hierarchy. But must admitt that I haven't > foundmany good answers. > > The best suggestion was from > http://badgertronics.com/knowledge/one.adp?parent=25: > > To move /tmp/blarg to /var: > % cd /tmp > % tar cvf - blarg | (cd /var; tar xf -) > > I bet there must be atleast one utils like a binary named "mvdir" or > similar that simply taked two directory names as argument. But I can't > find any. > > How do you guys move around your directory structures from prompt? I have used the following many times, with very good results: # cd /source/path # find . | cpio -p -dmvu /destination/dir The "pass through" mode of cpio(1) works on at least the following systems that I have used it: - Linux - BSD - Solaris The first two use GNU cpio(1). The second uses the system cpio(1), at least in the versions I have used.