From owner-freebsd-questions@FreeBSD.ORG Wed Jan 12 21:04:05 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 23B7A16A4CE for ; Wed, 12 Jan 2005 21:04:05 +0000 (GMT) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9783C43D55 for ; Wed, 12 Jan 2005 21:04:03 +0000 (GMT) (envelope-from nkinkade@fastmail.fm) Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 4DAEFC4CE1C; Wed, 12 Jan 2005 16:04:02 -0500 (EST) X-Sasl-enc: Krhmjo5l0HYM7U9IIv78pg 1105563840 Received: from gentoo-npk.bmp.ub (unknown [206.27.244.136]) by www.fastmail.fm (Postfix) with ESMTP id 84974247F3; Wed, 12 Jan 2005 16:03:59 -0500 (EST) Received: from nkinkade by gentoo-npk.bmp.ub with local (Exim 4.21) id 1Copep-0003Nw-Bi; Wed, 12 Jan 2005 15:03:59 -0600 Date: Wed, 12 Jan 2005 15:03:59 -0600 From: Nathan Kinkade To: Toomas Aas Message-ID: <20050112210359.GN3639@gentoo-npk.bmp.ub> References: <41E58A4E.9000105@raad.tartu.ee> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wmfuW8osuO2pi9jF" Content-Disposition: inline In-Reply-To: <41E58A4E.9000105@raad.tartu.ee> User-Agent: Mutt/1.5.6i Sender: cc: questions@freebsd.org Subject: Re: can't figure out an one-liner X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nathan Kinkade List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 21:04:05 -0000 --wmfuW8osuO2pi9jF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 12, 2005 at 10:36:30PM +0200, Toomas Aas wrote: > Hello! >=20 > I have a directory structure like this >=20 > /home > /joe > /peter > /bill > ... etc >=20 > I'm trying to move some (but not all) subdirectories of /home to=20 > /newhome, using tar. I'm doing this as root on FreeBSD 4.10, the shell=20 > is csh. I'd like to get it done with one command line. >=20 > I'm trying variations of this command >=20 > # pwd > /newhome >=20 > # for luser in 'joe peter bill' { tar cf - -C /home $luser | tar xf - } >=20 > ... but I keep getting error messages that luser is undefined. >=20 > What am I doing wrong? Are /home and /newhome on different filesystems? What wrong with a simple mv? For example: # mv joe peter bill /newhome If the directories are on the same filesystem the move won't require anything but some shuffling of metadata and will happen pretty much instantaneously. Nathan --wmfuW8osuO2pi9jF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFB5ZC/O0ZIEthSfkkRArWBAJ0adw2/U5xl3Z3CFHOtRgvixRqsiACg5M83 3ITzm4fXcqTjzHmHxxcRP18= =n6fk -----END PGP SIGNATURE----- --wmfuW8osuO2pi9jF--