From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,de415d2905e853f8 X-Google-Attributes: gidfee84,public From: Andrew Sheaff Subject: Re: Moving File Systems to Larger Disk? Date: 1995/10/13 Message-ID: <45llp4$15ps@sol.caps.maine.edu>#1/1 X-Deja-AN: 117503070 references: <45he5q$769@news.nic.com> content-type: text/plain; charset=us-ascii organization: UMaine x-url: news:45he5q$769@news.nic.com mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 1.12 (X11; I; OSF1 V3.2 alpha) I have moved filesystem around frequently. So we have a nice script using gtar: It will NOT cross mount points. Be sure to specify FULL pathnames for the directories. For example copy /usr to a temp disk mounted on /mnt: cpdir /usr /mnt -- #!/bin/sh # # Shell script to recursively copy the contents of the FROMDIR directory # to the TODIR directory without changing the permissions and ownership # and not crossing filesystems in the FROMDIR directory. # FROMDIR=$1 TODIR=$2 echo "Recursively copy the contents of the directory ${FROMDIR}" echo -n " to the directory ${TODIR} (y/n)? " read ANS case ${ANS} in [yY]*) echo -n "Copying... " cd ${FROMDIR}; /usr/local/bin/gtar clf - . | (cd ${TODIR}; /usr/local/ bin/gtar xpf -) echo " Done." ;; *) echo "Directory copy aborted by user." ;; esac -- Andy Sheaff - sheaff@eece.maine.edu http://www.eece.maine.edu/Faculty/Sheaff.html