Sponsored Content
Full Discussion: mac backup script in leopard
Top Forums Shell Programming and Scripting mac backup script in leopard Post 302206796 by woodgie on Wednesday 18th of June 2008 12:41:04 PM
Old 06-18-2008
Quote:
Originally Posted by Billy T
Hi all

I had a nice simple backup script on my mac running Tiger. I used an Automator 'Run Shell Script' command that loaded psync and backed up one directory on an external drive to a directory on another external drive. This was the command

/usr/local/bin/runpsync 0 0 0 '/Volumes/PORT80/Data Transfer' '/Volumes/BILL RAID/iPod Backup'

It only copied updated files, so it was fast and suited my needs very nicely. Unfortunately, psync no longer appears to work in leopard so I am looking for a new solution that is equally simple. I have checked out RSyncX and it seems very close to what I want but I can't work out how to extract a similar shell script to the one I had working before

Can anyone help?

Thanks in advance

PS I know very little about shell scripting
Well, there's plain old rsync which can be called from the command line and after a few, shall we say 'interesting' problems with it in Tiger Apple seem to have a stable version in Leopard. It also now properly handles resource forks which as a Mac user is very important (though getting less so). man rsync reveals that '-E' is the important option here.

There's also the most brilliant Carbon Copy Cloner from the venerable Mike Bombich. Don't ask me about it's scriptability though. Having said that his site is just about the last word when it comes to imaging etc. on the Mac. I'm sure you'll find something there to help you.
 

2 More Discussions You Might Find Interesting

1. OS X (Apple)

loading MAC X 5.0(leopard) on a X86 laptop

I want to install MAC X 5.x on my T60 Lenova laptop. I have the Original Mac X 5.0 installation media. I tried to install it on a blank hard disk in my laptop but it doesn't work. On the internet I found sites that offer torrent downloads but I can't use torrent downloads on my laptop. (Corp... (1 Reply)
Discussion started by: mndavies
1 Replies

2. OS X (Apple)

Use a Serial Console with Mac OS X Leopard

I'm trying to use an old Commodore 128D as a terminal to access OS X's shell via a serial port. I've used 'screen' and 'zterm' to ensure the two machines are successfully interfaced. Instructions for opening up the serial console on other Unix-y operating systems don't work with OS X Leopard. ... (3 Replies)
Discussion started by: joecassara
3 Replies
OPEN(1) 						    BSD General Commands Manual 						   OPEN(1)

NAME
open -- open files and directories SYNOPSIS
open [-e] [-t] [-f] [-F] [-W] [-R] [-n] [-g] [-h] [-b bundle_identifier] [-a application] file ... [--args arg1 ...] DESCRIPTION
The open command opens a file (or a directory or URL), just as if you had double-clicked the file's icon. If no application name is speci- fied, the default application as determined via LaunchServices is used to open the specified files. If the file is in the form of a URL, the file will be opened as a URL. You can specify one or more file names (or pathnames), which are interpreted relative to the shell or Terminal window's current working directory. For example, the following command would open all Word files in the current working directory: open *.doc Opened applications inherit environment variables just as if you had launched the application directly through its full path. This behavior was also present in Tiger. The options are as follows: -a application Specifies the application to use for opening the file -b bundle_indentifier Specifies the bundle identifier for the application to use when opening the file -e Causes the file to be opened with /Applications/TextEdit -t Causes the file to be opened with the default text editor, as determined via LaunchServices -f Reads input from standard input and opens the results in the default text editor. End input by sending EOF character (type Control-D). Also useful for piping output to open and having it open in the default text editor. -F Opens the application "fresh," that is, without restoring windows. Saved persistent state is lost, except for Untitled documents. -W Causes open to wait until the applications it opens (or that were already open) have exited. Use with the -n flag to allow open to func- tion as an appropriate app for the $EDITOR environment variable. -R Reveals the file(s) in the Finder instead of opening them. -n Open a new instance of the application(s) even if one is already running. -g Do not bring the application to the foreground. -h Searches header locations for a header whose name matches the given string and then opens it. Pass a full header name (such as NSView.h) for increased performance. --args All remaining arguments are passed to the opened application in the argv parameter to main(). These arguments are not opened or inter- preted by the open tool. EXAMPLES
"open '/Volumes/Macintosh HD/foo.txt'" opens the document in the default application for its type (as determined by LaunchServices). "open '/Volumes/Macintosh HD/Applications/'" opens that directory in the Finder. "open -a /Applications/TextEdit.app '/Volumes/Macintosh HD/foo.txt'" opens the document in the application specified (in this case, TextE- dit). "open -b com.apple.TextEdit '/Volumes/Macintosh HD/foo.txt'" opens the document in the application specified (in this case, TextEdit). "open -e '/Volumes/Macintosh HD/foo.txt'" opens the document in TextEdit. "ls | open -f" writes the output of the 'ls' command to a file in /tmp and opens the file in the default text editor (as determined by LaunchServices). "open http://www.apple.com/" opens the URL in the default browser. "open 'file://localhost/Volumes/Macintosh HD/foo.txt'" opens the document in the default application for its type (as determined by Launch- Services). "open 'file://localhost/Volumes/Macintosh HD/Applications/'" opens that directory in the Finder. "open -h NSView" lists headers whose names contain NSView and allows you to choose which ones to open. "open -a Xcode -h NSString.h" quickly opens /System/Library/Frameworks/Foundation.framework/Headers/NSString.h in Xcode. HISTORY
First appeared in NextStep. Mac OS X February 10, 2004 Mac OS X
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy