From owner-freebsd-questions@FreeBSD.ORG Fri Mar 4 21:13:18 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 0D0B716A4CE for ; Fri, 4 Mar 2005 21:13:18 +0000 (GMT) Received: from mail-core.space2u.com (mail-core.space2u.com [62.20.1.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DD0543D31 for ; Fri, 4 Mar 2005 21:13:17 +0000 (GMT) (envelope-from jd@dagerot.com) Received: from localhost (www-core.space2u.com [62.20.1.180]) by mail-core.space2u.com (8.13.3/8.13.2) with ESMTP id j24LD51s026558; Fri, 4 Mar 2005 22:13:06 +0100 Date: Fri, 4 Mar 2005 22:13:05 +0100 Message-Id: <200503042113.j24LD51s026558@mail-core.space2u.com> MIME-Version: 1.0 From: "Joachim Dagerot" To: Giorgos Keramidas Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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 21:13:18 -0000 Thanks for your suggestion. Unfortunately your commands will not affect the root folder of the hierarchy. I must create a directory in the destination path with the same name of the folder where my data is in. example: /home/user/level1/l2/l3/l4 I would like to move level1 to a new location: mvdir /home/user/level1 /root/ That would be awsome! >> 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