can't figure out an one-liner
Nathan Kinkade
nkinkade at ub.edu.bz
Wed Jan 12 13:04:05 PST 2005
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050112/9cadea2f/attachment.bin
More information about the freebsd-questions
mailing list