[X-Unix] shell scripting

Albert Lunde atlunde at panix.com
Thu Jan 15 19:06:58 PST 2004


On Thu, Jan 15, 2004 at 08:34:54PM -0600, Bert Knabe wrote:
> At the suggestion of people on an Applescript list, I created a folder 
> action, then learned that in OS X folder actions are unreliable. I 
> tried several 'solutions' for reenabling them on a regular basis. All 
> failed. The result is that I am manually copying files twice a day. So 
> I'm ready to give up on Applescript/folder action combo's for now, and 
> do something different.

perl makes a better Unix scripting toolbox that shell scripts or C++.

In this case, if you don't care about anything but the data fork
and classic Unix permissions, you might be able to do it with
rsync. If you need all the Mac permissions, look for rsyncX
but beware that it's usually behind the main rsync code.

The rsync program does efficient one-direction incremental
updates, copying any changed files. If you are going
over the network it can copy parts of files, locally I think
it defaults to doing whole file copies.

See: http://rsync.samba.org/

You can use a cron job to run something perodically as long
as the box doesn't sleep.





More information about the X-Unix mailing list