anyone ever set up rsync or other terminal scripts

anyone ever set up rsync or other terminal scripts - 03/05/0805:02 PM

I have a command that I like to run in the terminal. It takes the contents of my school folder and synchronizes the changes with the same folder on a flash drive.<br><br>Is there any lightweight way that I can script the finder so that when I insert a flash drive, it automatically runs a command?<br><br>-- Cee Bee Double-U

Re: anyone ever set up rsync or other terminal scripts - 11/25/0810:02 PM

Re: anyone ever set up rsync or other terminal scr - 12/01/0807:53 PM

look into an app called "Lingon" if you want to start messing around with launchd ..it's great.

While you can do stuff via launchd when volumes are mounted ...you might want to wrap the terminal command into an applescript that looks to see what volume was mounted. Otherwise it will run when ANY volume is mounted.

This is how you would write the script...

Code:

set theVolumeName to "YourFlashDriveNameHERE"
tell application "Finder"
if disk theVolumeName exists then
do shell script "ENTER YOUR TERMINAL COMMAND HERE"
end if
end tell