Welcome to MacForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

BASH question

 
   Macintosh computer (Home) -> General Discussion RSS
Related Topics:
launching shell scripts (bash) from OS X 10.3 from the des.. - hello, i've created some shell scripts (bash, OS X 10.3) to retrieve from different and copy them to my local HD. this works fine, but i have to start them from the terminal window by typing "sh is..

Executing bash scripts by double-clicking - Hi, I'm trying to execute a bash shell script by on the file. I've made sure that it's (chmod 777), and I've tried appending to the end of the file. When it's when I the script is..

Mac OS 9.x question - Is there a Usenet group dedicated to Mac OS 9.x? Can't find any. It seems like we're an abandoned minority who to the old -- GR Gaudreau at sympatico dot ca> If you've never been here before, make sure you come back..

G3 vs G4 Question - I'm looking into the possible purchase of a used, but clean, powerbook 15" G4. I can't afford the 1+ghz, 1gb, bluetooth & airport installed version I want but am looking for something at least as fast as my G3 933mhz ibook. I see alot of the G4

8.6 question - I have a PB3400 with OS 8.6. The OS has been very reliable until now. I am getting an and the dreaded Restart window when I try to boot with any including if I select 8.6 Base or 8.6 All from Extension Manager. The..
Next:  General Discussion: Leopard & Tiger PAUSE Problem - Shared Printer  
Author Message
Howard Brazee

External


Since: Dec 28, 2006
Posts: 1075



(Msg. 1) Posted: Fri Apr 18, 2008 3:39 pm
Post subject: BASH question
Archived from groups: comp>sys>mac>misc (more info?)

I'd like to copy files from:
/Volumes/pbrazee/copy/My Documents/home/

from my .mac iDisk

to /Users/HBrazee/Documents/home/

on my iMac.

I want to keep the time-date stamp, and not copy files with a newer
time-date stamp on the destination directory.


I was thinking the way to go is with a BASH script - but I need some
help.

(I will be copying other directories of files back and forth within
the same script).

 >> Stay informed about: BASH question 
Back to top
Login to vote
Jim Gibson

External


Since: Jan 24, 2008
Posts: 50



(Msg. 2) Posted: Fri Apr 18, 2008 3:39 pm
Post subject: Re: BASH question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <005i045cfs7akj54i7m93gojnvt2rk2p8t.DeleteThis@4ax.com>, Howard Brazee
<howard.DeleteThis@brazee.net> wrote:

> I'd like to copy files from:
> /Volumes/pbrazee/copy/My Documents/home/
>
> from my .mac iDisk
>
> to /Users/HBrazee/Documents/home/
>
> on my iMac.
>
> I want to keep the time-date stamp, and not copy files with a newer
> time-date stamp on the destination directory.
>
>
> I was thinking the way to go is with a BASH script - but I need some
> help.
>
> (I will be copying other directories of files back and forth within
> the same script).
>

From the command line, you can use tar or 'rsync -t' to copy files
preserving the file times. Both have options for deciding to copy files
or not based on file times, although rsync is probably a little more
straightforward.

I don't understand "not copy files with a newer time-date stamp". This
seems counter to the normal practice of only copying files from a
source which are newer than the same-named file on the destination. Can
you explain further?

--
Jim Gibson

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
http://www.usenet.com

 >> Stay informed about: BASH question 
Back to top
Login to vote
Howard Brazee

External


Since: Dec 28, 2006
Posts: 1075



(Msg. 3) Posted: Sat Apr 19, 2008 7:50 am
Post subject: Re: BASH question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 18 Apr 2008 15:36:01 -0700, Jim Gibson <jimsgibson.TakeThisOut@gmail.com>
wrote:

>From the command line, you can use tar or 'rsync -t' to copy files
>preserving the file times. Both have options for deciding to copy files
>or not based on file times, although rsync is probably a little more
>straightforward.

I will man this command.

>I don't understand "not copy files with a newer time-date stamp". This
>seems counter to the normal practice of only copying files from a
>source which are newer than the same-named file on the destination. Can
>you explain further?

I guess it wasn't clear which side had the "newer time-date stamp".
 >> Stay informed about: BASH question 
Back to top
Login to vote
Howard Brazee

External


Since: Dec 28, 2006
Posts: 1075



(Msg. 4) Posted: Sat Apr 19, 2008 8:31 am
Post subject: Re: BASH question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 18 Apr 2008 15:36:01 -0700, Jim Gibson <jimsgibson DeleteThis @gmail.com>
wrote:

>From the command line, you can use tar or 'rsync -t' to copy files
>preserving the file times. Both have options for deciding to copy files
>or not based on file times, although rsync is probably a little more
>straightforward.

I noticed the man command included:

SYNOPSIS
rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST

rsync [OPTION]... [USER@]HOST:SRC DEST

rsync [OPTION]... SRC [SRC]... DEST

rsync [OPTION]... [USER@]HOST::SRC [DEST]

rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST

rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]

rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST


So I've been experimenting trying to find my .mac iDisk, but haven't
been able to figure out how to cd to it. The finde shows it as
"iDisk" on the left, but it may be named pbrazee (my wife's name is
Pat).
 >> Stay informed about: BASH question 
Back to top
Login to vote
Lewis

External


Since: Mar 19, 2008
Posts: 17



(Msg. 5) Posted: Sat Apr 19, 2008 5:54 pm
Post subject: Re: BASH question [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

[[This message is not archived, and is only displayed for one month past post date.]]

In message <e90k04l7erb1k3oh92fdd17nqghtvnas5k.RemoveThis@4ax.com>
Howard <howard.RemoveThis@brazee.net> wrote:
> On Fri, 18 Apr 2008 15:36:01 -0700, Jim Gibson <jimsgibson.RemoveThis@gmail.com>
> wrote:

>>From the command line, you can use tar or 'rsync -t' to copy files
>>preserving the file times. Both have options for deciding to copy files
>>or not based on file times, although rsync is probably a little more
>>straightforward.

> I noticed the man command included:

> SYNOPSIS
> rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST

> rsync [OPTION]... [USER@]HOST:SRC DEST

> rsync [OPTION]... SRC [SRC]... DEST

> rsync [OPTION]... [USER@]HOST::SRC [DEST]

> rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST

> rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]

> rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST


> So I've been experimenting trying to find my .mac iDisk, but haven't
> been able to figure out how to cd to it. The finde shows it as
> "iDisk" on the left, but it may be named pbrazee (my wife's name is
> Pat).

The iDisk is a local volume as far as rsync is concerned

rsync -Eav /Volumes/pbrazee/path/to/files ~/myLocaliDisk/

rsync will only copy over files that are not identical


--
I wrote this song two hours before we met. I didn't know your name, or what
you looked like yet....
 >> Stay informed about: BASH question 
Back to top
Login to vote
Howard Brazee

External


Since: Dec 28, 2006
Posts: 1075



(Msg. 6) Posted: Sat Apr 19, 2008 6:16 pm
Post subject: Re: BASH question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, 19 Apr 2008 17:54:30 -0500, Lewis
<g.kreme RemoveThis @gmail.com.dontsendmecopies> wrote:

>The iDisk is a local volume as far as rsync is concerned
>
>rsync -Eav /Volumes/pbrazee/path/to/files ~/myLocaliDisk/

Interesting. I have enough now to get started (I still have some
learning to do). Thanks.
 >> Stay informed about: BASH question 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]