home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!cs.utexas.edu!mercury.unt.edu!ponder.csci.unt.edu!jackson
- From: jackson@ponder.csci.unt.edu (Bruce Jackson)
- Subject: Re: How to move a filesytem?
- Message-ID: <1992Dec23.222707.28624@mercury.unt.edu>
- Sender: usenet@mercury.unt.edu (UNT USENet Adminstrator)
- Organization: University of North Texas, Denton
- References: <BzFBx0.ECD@encore.com> <1992Dec18.110817.6773@ghost.dsi.unimi.it> <1992Dec18.110958.25712@sei.cmu.edu>
- Date: Wed, 23 Dec 1992 22:27:07 GMT
- Lines: 37
-
- >In article <1992Dec18.110817.6773@ghost.dsi.unimi.it>, serini@ghost.dsi.unimi.it (Piero Serini) writes:
-
- >|> In single user mode:
-
- >|> # cd /
- >|> # mkdir usr2
- >|> # mount /dev/newdisk /usr2
- >|> # cd usr
- >|> # tar cf - . | compress | (cd /usr2 ; uncompress | tar xf - )
-
- In article <1992Dec18.110958.25712@sei.cmu.edu> kochmar@sei.cmu.edu (John Kochmar) writes:
-
- >I always use -p option to the second tar, so that permissions and
- >ownerships are set correctly. According to the man page, not using the
- >-p option will cause the files to be restored with the current umask,
- >and setUID and stickey information are also preserved.
-
- >Note: the -p is only necessary on the extract, not on the corrosponding
- >create (the man page sez it is only useful with the -x option.)
-
- I'll second using the `p' option to keep the current permissions
- intact.
-
- For sh, ksh, or bash I'd also use '&&' instead of ';' like:
-
- # tar cf - . | (cd /usr2 && tar xpf - )
-
- This way the tar extracting from stdin will *ONLY* run if the cd in front
- of it is sucessful. tar-ing overtop of the present files will cause them
- to be truncated. In csh or tcsh the '&&' does not seem to be necessary
- since it drops out if the cd fails.
-
- Bruce - jackson@cs.unt.edu
-
-
-
-
-