What's wrong with this command?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Steven M. Klass
Date:  
Subject: What's wrong with this command?
On Tuesday 26 June 2001 12:38, the famous Bill Warner wrote:

Terrific!!! But I have some questions-> GO FIGURE! :)

> 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


why did you not go directly to the -exec mkdir -> even with the cut
operation. I guess I'm curious why people say I should be doing it the xargs
way?

>       cd /$sourcedir
>     find . -type f -exec ln {} /$root/$destination/{} \;


But again I would think that I could substitute my -exec and it would work

It doesn't and I can't figure out why.. Hmm.


>
> 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.
>
>

--

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


http://www.andigilog.com