Re: [SLUG] moving files

From: Brian Coyle (brian@linuxwidows.com)
Date: Wed Mar 27 2002 - 21:17:14 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 27 March 2002 20:13, patrick grantham wrote:
> I will be adding a harddrive and I want to move content in and below /home
> to the new drive. I am concerned with what happens to the file attributes.
> How can I move files and folders and preserve the user and group ownership
> and the existing file access?

        # find /home -print | cpio -pumdv /newhome

from man cpio:

       -d, --make-directories
              Create leading directories where needed.
       -m, --preserve-modification-time
              Retain previous file modification times when creat­
              ing files.
       -p, --pass-through
              Run in copy-pass mode. [fancy way to say read STDIN]
       -u, --unconditional
              Replace all files, without asking whether to
              replace existing newer files with older files.
       -v, --verbose

HTH!

- --
Linux - the ultimate Windows Service Pack
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8on0qER3MuHUncBsRAuT0AJ9JBmJYANSEu2S4NRT5XES6X8C7hACdGR3v
92nNbcAhD8jbSgGh5yB28JQ=
=dP7X
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:50:33 EDT