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
[-- Attachment #1 --]
On Wed, Jan 12, 2005 at 10:36:30PM +0200, Toomas Aas wrote:
> Hello!
>
> I have a directory structure like this
>
> /home
> /joe
> /peter
> /bill
> ... etc
>
> I'm trying to move some (but not all) subdirectories of /home to
> /newhome, using tar. I'm doing this as root on FreeBSD 4.10, the shell
> is csh. I'd like to get it done with one command line.
>
> I'm trying variations of this command
>
> # pwd
> /newhome
>
> # for luser in 'joe peter bill' { tar cf - -C /home $luser | tar xf - }
>
> ... but I keep getting error messages that luser is undefined.
>
> 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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFB5ZC/O0ZIEthSfkkRArWBAJ0adw2/U5xl3Z3CFHOtRgvixRqsiACg5M83
3ITzm4fXcqTjzHmHxxcRP18=
=n6fk
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050112210359.GN3639>
