[CLUE-Tech] tar question
Bruce Ediger
eballen1 at qwest.net
Fri Mar 14 15:51:19 MST 2003
On Fri, 14 Mar 2003, Mike Staver wrote:
> Right - but I guess I was too vague with that - I'm doing this for *all*
> users with folders in the /home directory, and yes, the password files
> on both servers are exactly the same.
OK. Try this one:
cd /home; tar czf /tmp/homes.tar.gz `find . -type d -maxdepth 1`
This assumes that all directories in /home constitute "home"
directories, and that you don't mind "./" in front of all
of the "home" directories in the tar file.
If the copied-from-machine doesn't have enough disk space
to allow creation of the /tmp/homes.tar.gz file, you could
maybe do some stunt with ssh and pipes.
cd /home; tar czf - `find . -type d -maxdepth 1` | ssh root at destination 'cd /home; tar xzf -'
Try it - I don't 100% know that will work in your circumstances,
but it worked for me.
More information about the clue-tech
mailing list