Date: Wed, 12 Jan 2005 15:03:59 -0600 From: Nathan Kinkade <nkinkade@ub.edu.bz> To: Toomas Aas <toomas.aas@raad.tartu.ee> Cc: questions@freebsd.org Subject: Re: can't figure out an one-liner Message-ID: <20050112210359.GN3639@gentoo-npk.bmp.ub> In-Reply-To: <41E58A4E.9000105@raad.tartu.ee> References: <41E58A4E.9000105@raad.tartu.ee>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050112210359.GN3639>