[1147] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: moving contents of hard drive

daemon@ATHENA.MIT.EDU (Aaron Holtz)
Sat Oct 26 18:39:28 1996

Date: Sat, 26 Oct 1996 18:36:02 -0400 (EDT)
From: Aaron Holtz <primus@stockcar.network1.net>
To: redhat-list@redhat.com
In-Reply-To: <327281BE.188B4840@iceonline.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

One of my favorite shell scripts is as follows:

#!/bin/sh -v
cd $1; tar cf - . | (cd $2; tar xfBp -)



Save the file as  'ctar'  and make it executable.
To run it, type:

ctar fromdir todir


This will copy all files, etc and symbolic links from the   fromdir  to 
the todir (the destination directory.)  Hope someone can find this useful!



						Aaron



On Sat, 26 Oct 1996, BORG wrote:

> Info junkie wrote:
> > 
> > I'll probably go with cp -dRp /source /target
> > 
> > -d maintain any symlinks
> > -R do it recursively
> > -p retain permissions and all other attributes.
> 
> This is exactly the same as cp -a.
> 
> Regards,
> Vlad
> 
> 
> --
>   PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
>   ________________________________________________________________________
>   http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
>   http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
>   ------------------------------------------------------------------------
> To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null
> 


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post