Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Andrew Sheaff <sheaff@eece.maine.edu>
Subject: Re: Moving File Systems to Larger Disk?
Date: 1995/10/13	[thread overview]
Message-ID: <45llp4$15ps@sol.caps.maine.edu> (raw)
In-Reply-To: 45he5q$769@news.nic.com

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




  parent reply	other threads:[~1995-10-13  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-11  4:00 Moving File Systems to Larger Disk? Bruce B. Platt
1995-10-12  4:00 ` oberman
1995-10-13  4:00 ` Andrew Sheaff [this message]
1995-10-14  4:00 ` Tim W. Janes
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox