What's wrong with this command?

Bill Warner plug-discuss@lists.PLUG.phoenix.az.us
26 Jun 2001 12:38:15 -0700


I was doing something almost exaclty the same as this.

I was duplicating directory structures and hardlinking files for use
with nfs root filesystems.

these were the commands I came up with:
    cd /$backupdir
    find ../$sourcedir -type d | cut -c 13-256 |xargs mkdir
      cd /$sourcedir
    find . -type f -exec ln {} /$root/$destination/{} \;

the cut used in the first one was to cut off the base direcitory because
find was returning more than what i wanted.  you may need to adjust the
size of the cut to fit your situations. I am only now starting to
revisit this script for use again so YMMV.

Bill Warner

On 26 Jun 2001 09:32:34 -0700, Steven M. Klass wrote:
> Hey all,
> 
> I am working on a back-up script.  I'm really into the meat of if right now 
> and I can't figure out how to do something.  Basically my backup script will 
> recreate the directory structure and only tar the files in the directory.  To 
> recreate the directory structure I use
>   find $SOURCE -type d -exec mkdir $BACKUPDIR{} \;
> 
> Now for the fun part looking into each directory and and only taring the 
> files and symbolic links.. I'm trying variations of the above to no avail. 
> Here is the idea that I have been working with..
> 
> find $SOURCE -type d -exec tar -czvf $BACKUPDIR/{}/badkup.tar.gz  SOURCE/{}\: 
> 
> This doesn't work. Can someone help me out here? Do I need to implement this 
> into a larger function?
> 
> -- 
> 
> Steven M. Klass
> Physical Design Engineering Manager
> 
> Andigilog Inc.
> 7404 W. Detroit Street, Suite 100
> Chandler, AZ 85226
> Ph: 480-940-6200 ext. 18
> Fax: 480-940-4255
> 
> sklass@andigilog.com
> http://www.andigilog.com
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

-- 
Bill Warner
Unix/Linux Admin.
Direct Alliance Corporation Confidential