From seasoft at west.net Wed Jan 2 21:43:08 2008 From: seasoft at west.net (Richard Hartman) Date: Wed Jan 2 21:43:14 2008 Subject: [X-Unix] Re: Pokey LAN transfers (Resolved + a followup) In-Reply-To: <1264F072-B419-495F-8756-28368434E16E@west.net> References: <20071227193042.220A12D848B@listserver.themacintoshguy.com> <1264F072-B419-495F-8756-28368434E16E@west.net> Message-ID: <1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net> For those of you with interest in this goat rope, there has been a development that isn't surprising in hindsight; in fact most of you will simply think "well, duh!" But, for any other noobs struggling to make sense of it all, consider this: I was having sporadic & bizarre trouble with DVD burns on my "system #2" MacBookPro (see below; running Leopard) and after much troubleshooting, tracked the problem down to some errant system & plist files. The MBPro Leopard had been a clean install, not an upgrade, but it got a "migration assist" from my existing Tiger system. On the suspicion that the migration might have caused other issues, I erased & re-installed & updated Leopard on the MBPro, AND installed every necessary piece of software from scratch (i.e., NO migration). Lo and behold, finder copies of the kind that formerly went at 25 megabits per second are now shooting across at full speed (100 mbps). So, although there was no indication in my console or system logs that anything was awry before the reinstall, in fact that pesky migration assistant evidently produced some sort of havoc. The Finder now copies as fast as rsync. Moral, for me: Never, ever use migration assistant for major system upgrades; it oughta be a law... Richard On Dec 27, 2007, at 11:49 AM, Richard Hartman wrote: > Thanks to Wing Wong, Nick Scalise, David Ledger and Brian Medley > for their thoughtful responses. For some reason, Wing Wong's > detailed response didn't make it to the list and is reproduced > (far) below. > > Here is a summary of what I learned: > > The overhead on my setup of mounting a volume on the desktop (via > AFP) is evidently enormous: > > - Mounting a LAN volume on the local desktop and then using cp on a > large (2GB) file using a terminal window (copying from mounted LAN > volume to internal disk drive) produced transfer rates of only > about 25 megabits/sec. > > - Unmounting the LAN volume and instead using scp or rsync (and the > IP address of the source mac) produced the expected transfer rate > of 100 megabits/sec, which was the speed limit expected by the > slowest network element in the loop (the 100 mbps nic on one of the > macs). > > Regards, > > Rich > >> On Dec 26, 2007 1:54 PM, Richard Hartman < seasoft@west.net> wrote: >> I'm looking for guidance on how best to copy large data sets between >> macs on a network (Finder, terminal cp, other?). >> >> The setup: Copying from mac #1 (a 2006 iMac running 10.4.11 with >> built-in 100bps ethernet) to mac #2 (a recent PBPro running 10.5.1 >> with built-in Gigabit ethernet). Macs connected by a Gigabit netgear >> switch. >> >> I had hoped to get sustained transfers between these two macs of >> 50-70 mbps (throttled by the rate-limiting 100 mbps iMac capability). >> >> However, copying a single 2 GByte file, by mounting the (Tiger) imac >> on the (Leopard) MBPro desktop and using terminal "cp" command from >> the MBPro terminal, results in a sustained transfer rate of only >> about 2.5 mB/sec (25 mbps). >> > > From wingedpower at gmail.com Wed Jan 2 23:15:20 2008 From: wingedpower at gmail.com (Wing Wong) Date: Wed Jan 2 23:15:24 2008 Subject: [X-Unix] Re: Pokey LAN transfers (Resolved + a followup) In-Reply-To: <1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net> References: <20071227193042.220A12D848B@listserver.themacintoshguy.com> <1264F072-B419-495F-8756-28368434E16E@west.net> <1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net> Message-ID: <7097bd8c0801022315t7759ba15l222fbeb7c177c707@mail.gmail.com> Hardly a "duh" moment at all. Good catch! Wing On 1/2/08, Richard Hartman wrote: > For those of you with interest in this goat rope, there has been a > development that isn't surprising in hindsight; in fact most of you > will simply think "well, duh!" But, for any other noobs struggling to > make sense of it all, consider this: > > I was having sporadic & bizarre trouble with DVD burns on my "system > #2" MacBookPro (see below; running Leopard) and after much > troubleshooting, tracked the problem down to some errant system & > plist files. > > The MBPro Leopard had been a clean install, not an upgrade, but it > got a "migration assist" from my existing Tiger system. On the > suspicion that the migration might have caused other issues, I erased > & re-installed & updated Leopard on the MBPro, AND installed every > necessary piece of software from scratch (i.e., NO migration). > > Lo and behold, finder copies of the kind that formerly went at 25 > megabits per second are now shooting across at full speed (100 mbps). > > So, although there was no indication in my console or system logs > that anything was awry before the reinstall, in fact that pesky > migration assistant evidently produced some sort of havoc. The Finder > now copies as fast as rsync. > > Moral, for me: Never, ever use migration assistant for major system > upgrades; it oughta be a law... > > Richard > > On Dec 27, 2007, at 11:49 AM, Richard Hartman wrote: > > > Thanks to Wing Wong, Nick Scalise, David Ledger and Brian Medley > > for their thoughtful responses. For some reason, Wing Wong's > > detailed response didn't make it to the list and is reproduced > > (far) below. > > > > Here is a summary of what I learned: > > > > The overhead on my setup of mounting a volume on the desktop (via > > AFP) is evidently enormous: > > > > - Mounting a LAN volume on the local desktop and then using cp on a > > large (2GB) file using a terminal window (copying from mounted LAN > > volume to internal disk drive) produced transfer rates of only > > about 25 megabits/sec. > > > > - Unmounting the LAN volume and instead using scp or rsync (and the > > IP address of the source mac) produced the expected transfer rate > > of 100 megabits/sec, which was the speed limit expected by the > > slowest network element in the loop (the 100 mbps nic on one of the > > macs). > > > > Regards, > > > > Rich > > > >> On Dec 26, 2007 1:54 PM, Richard Hartman < seasoft@west.net> wrote: > >> I'm looking for guidance on how best to copy large data sets between > >> macs on a network (Finder, terminal cp, other?). > >> > >> The setup: Copying from mac #1 (a 2006 iMac running 10.4.11 with > >> built-in 100bps ethernet) to mac #2 (a recent PBPro running 10.5.1 > >> with built-in Gigabit ethernet). Macs connected by a Gigabit netgear > >> switch. > >> > >> I had hoped to get sustained transfers between these two macs of > >> 50-70 mbps (throttled by the rate-limiting 100 mbps iMac capability). > >> > >> However, copying a single 2 GByte file, by mounting the (Tiger) imac > >> on the (Leopard) MBPro desktop and using terminal "cp" command from > >> the MBPro terminal, results in a sustained transfer rate of only > >> about 2.5 mB/sec (25 mbps). > >> > > > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > -- Wing Wong wingedpower@gmail.com From rick at rickgordon.com Mon Jan 7 01:22:47 2008 From: rick at rickgordon.com (Rick Gordon) Date: Mon Jan 7 01:18:44 2008 Subject: [X-Unix] Sending Commands to Apple External USB Modem In-Reply-To: <7097bd8c0801022315t7759ba15l222fbeb7c177c707@mail.gmail.com> References: <20071227193042.220A12D848B@listserver.themacintoshguy.com> <1264F072-B419-495F-8756-28368434E16E@west.net> <1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net> <7097bd8c0801022315t7759ba15l222fbeb7c177c707@mail.gmail.com> Message-ID: Can someone point me in the direction of how to send raw commands to an Apple External USB Modem (v. 92)? Mainly, I would like to be able to tell the modem to go on hold indefinitely. Information on lists the following command sequence: To make an outgoing call while holding your Internet connection: AT+PMHR - response will be value from above chart - server starts timer AT+PMHF - your modem does a hook flash; gives you dial-tone on extension phone plugged into modem; You can place your call. When finished and you hang up, the line will RING. But I'm not sure how to send commands to the modem. (Back in Classic days, with a serial modem, I would have used an application such as HyperTerminal or DataComet, but I've lost touch with how to communicate with an external USB modem under OS X.) Thanks in advance. -- ___________________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________________ WWW: http://www.shelterpub.com From groups at pursued-with.net Mon Jan 7 03:58:32 2008 From: groups at pursued-with.net (Kevin Stevens) Date: Mon Jan 7 03:58:40 2008 Subject: [X-Unix] Sending Commands to Apple External USB Modem In-Reply-To: References: <20071227193042.220A12D848B@listserver.themacintoshguy.com> <1264F072-B419-495F-8756-28368434E16E@west.net> <1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net> <7097bd8c0801022315t7759ba15l222fbeb7c177c707@mail.gmail.com> Message-ID: <1799D1C4-B6F8-44D1-98F9-3F7E2BC90594@pursued-with.net> On Jan 7, 2008, at 01:22, Rick Gordon wrote: > Can someone point me in the direction of how to send raw commands to > an Apple External USB Modem (v. 92)? > > Mainly, I would like to be able to tell the modem to go on hold > indefinitely. > > Information on lists the > following command sequence: > > To make an outgoing call while holding your Internet connection: > > AT+PMHR - response will be value from above chart - server starts > timer > > AT+PMHF - your modem does a hook flash; gives you dial-tone on > extension phone plugged into modem; You can place your call. When > finished and you hang up, the line will RING. > > But I'm not sure how to send commands to the modem. (Back in Classic > days, with a serial modem, I would have used an application such as > HyperTerminal or DataComet, but I've lost touch with how to > communicate with an external USB modem under OS X.) Don't know specifically about the Apple modem, but I'll wager it sets itself up as a /dev/serial.something device, as the USB<>serial converters do. Once you find the device, you can use minicom or ZTerm or similar to connect to it just as you describe - they have a place in the config to identify the device. I *really* wish someone would do a Cocoa terminal like iTerm that knows how to talk to serial devices. ZTerm is very dated (like 10.1 dated), and all the alternatives I know of are enterprise class $100+ apps with fancy terminal emulations. I just need to talk to routers, etc. on a semi-regular basis. KeS From ecrist at secure-computing.net Mon Jan 7 04:12:19 2008 From: ecrist at secure-computing.net (=?utf-8?B?RXJpYyBGIENyaXN0?=) Date: Mon Jan 7 04:14:16 2008 Subject: [X-Unix] Sending Commands to Apple External USB Modem In-Reply-To: References: <20071227193042.220A12D848B@listserver.themacintoshguy.com><1264F072-B419-495F-8756-28368434E16E@west.net><1921A7AE-10FA-4062-AAEC-0DD08680667C@west.net><7097bd8c0801022315t7759ba15l222fbeb7c177c707@mail.gmail.com> Message-ID: <296505281-1199708046-cardhu_decombobulator_blackberry.rim.net-1846669598-@bxe135.bisx.prod.on.blackberry> You'll need a utility such as cu or minicomm, and you'll have to figure out which Tty it's being attached as. The console.log should give you a clue, watch it (tail -f /var/log/console.log) while you plug in the modem. This is an educated guess at best, since I don't have one of these brasties to play with. HTH --- Eric F Crist Secure Computing Networks -----Original Message----- From: Rick Gordon Date: Mon, 7 Jan 2008 01:22:47 To:"A place to discuss Mac OS X from the perspective of the command line." Subject: [X-Unix] Sending Commands to Apple External USB Modem Can someone point me in the direction of how to send raw commands to an Apple External USB Modem (v. 92)? Mainly, I would like to be able to tell the modem to go on hold indefinitely. Information on lists the following command sequence: To make an outgoing call while holding your Internet connection: AT+PMHR - response will be value from above chart - server starts timer AT+PMHF - your modem does a hook flash; gives you dial-tone on extension phone plugged into modem; You can place your call. When finished and you hang up, the line will RING. But I'm not sure how to send commands to the modem. (Back in Classic days, with a serial modem, I would have used an application such as HyperTerminal or DataComet, but I've lost touch with how to communicate with an external USB modem under OS X.) Thanks in advance. -- ___________________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________________ WWW: http://www.shelterpub.com _______________________________________________ X-Unix mailing list X-Unix@listserver.themacintoshguy.com http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From seasoft at west.net Tue Jan 22 12:22:01 2008 From: seasoft at west.net (Richard Hartman) Date: Tue Jan 22 12:22:39 2008 Subject: [X-Unix] Leopard Short Name Issue Message-ID: <7FE7AC38-C545-4FAB-9A41-CF81F0879FDC@west.net> I have encountered a bizarre situation that I have been unable to resolve. The machine is an emac running postfix (managed by the Mailserve GUI front end to Postfix) under Leopard 10.5.1. The issue: The main admin account on this machine (LONG name "Richard") has become associated in some way with TWO "short names", "rjh" and "richard". The leopard installation was an "archive and install" from a panther installation (after hacking, without problems, the Leopard installer to permit installation on the 700 mhz eMac). Everything on the system appears to be running smoothly, including postfix, timbuktu, fax, and numerous other tasks. The schizophrenia evidence: 0. There is no user "richard" in /Users/; there is of course a user "rjh". 1. If I try to create a new admin account with a new LONG name ("Rick, for example) and the short name "richard", I get a dialog that the short name "richard" is already taken by another user. (There are a couple other accounts on the machine, neither has long or short name remotely close to "richard" or "Richard"). 2. If I send email to "rjh@myserver.org", it gets placed, as expected, in mbox /var/mail/rjh 3. If I send email to "richard@myserver.org", it gets placed in another mbox /var/mail/richard BUT: Both the richard and rjh mboxes belong to user "Richard" (e.g., there is no password prompt if I command: rjh$ mail -u richard 4. If I send mail to any OTHER nonexistent user (other than "richard"), e.g. someuser@myserver.org, it goes, via my Postfix settings, into the rjh mbox as expected. At a minimum, I would like to be able to get to the "richard" mbox with a mail client, but can't figure out how to do that because it seems to be a second mbox owned by "rjh". Apple Mail only sees the "rjh" mbox. I've snooped through James Bucanek's documentation for "ChangeShortName" (which doesn't work under Leopard) but didn't get any ideas. I do know enough to be aware that the netinfo database has been superseded in Leopard, but not enough to know how to understand or fix this problem. Any tips or guidance much appreciated, Richard From ipmonger at delamancha.org Tue Jan 22 14:10:01 2008 From: ipmonger at delamancha.org (Jon Boone) Date: Tue Jan 22 14:10:41 2008 Subject: [X-Unix] Leopard Short Name Issue In-Reply-To: <7FE7AC38-C545-4FAB-9A41-CF81F0879FDC@west.net> References: <7FE7AC38-C545-4FAB-9A41-CF81F0879FDC@west.net> Message-ID: <498D7BB7-AC5B-4597-AC31-E52EE04D502E@delamancha.org> On Jan 22, 2008, at 3:22 PM, Richard Hartman wrote: > The issue: The main admin account on this machine (LONG name > "Richard") has become associated in some way with TWO "short names", > "rjh" and "richard". > What happens when you try the following: % dscl . -read /Users/rjh % dscl . -read /Users/richard From scott-xlists at scotist.com Tue Jan 22 15:56:21 2008 From: scott-xlists at scotist.com (Scott) Date: Tue Jan 22 15:56:27 2008 Subject: [X-Unix] Leopard Short Name Issue In-Reply-To: <7FE7AC38-C545-4FAB-9A41-CF81F0879FDC@west.net> References: <7FE7AC38-C545-4FAB-9A41-CF81F0879FDC@west.net> Message-ID: On Jan 22, 2008, at 12:22 PM, Richard Hartman wrote: > I have encountered a bizarre situation that I have been unable to > resolve. > > The machine is an emac running postfix (managed by the Mailserve GUI > front end to Postfix) under Leopard 10.5.1. > > The issue: The main admin account on this machine (LONG name > "Richard") has become associated in some way with TWO "short names", > "rjh" and "richard". In System Prefs ->Accounts right or control-click on Richard. Select "Advanced Options". Is richard listed as an alias of rjh? If so, remove it, then setup richard as another user. Save the mbox first if you need the contents. -- Scott From seasoft at WEST.NET Tue Jan 22 17:05:04 2008 From: seasoft at WEST.NET (Richard Hartman) Date: Tue Jan 22 17:05:11 2008 Subject: [X-Unix] Re: Leopard Short Name Issue Message-ID: <5CFA4E1B-1943-4E81-925B-EE25542E6F17@WEST.NET> ======================= Jon Boone wrote: On Jan 22, 2008, at 3:22 PM, Richard Hartman wrote: >> The issue: The main admin account on this machine (LONG name >> "Richard") has become associated in some way with TWO "short names", >> "rjh" and "richard". >What happens when you try the following: >% dscl . -read /Users/rjh I get LOTS of stuff with the expected info on the "rjh" account >% dscl . -read /Users/richard This produces... zilch: $ dscl . -read /Users/richard DS Error: -14136 (eDSRecordNotFound) Thanks for the effort Jon; but, no joy... ======================= Scott wrote: On Jan 22, 2008, at 12:22 PM, Richard Hartman wrote: >> I have encountered a bizarre situation that I have been unable to >> resolve. >> >> The machine is an emac running postfix (managed by the Mailserve GUI >> front end to Postfix) under Leopard 10.5.1. >> >> The issue: The main admin account on this machine (LONG name >> "Richard") has become associated in some way with TWO "short names", >> "rjh" and "richard". >In System Prefs ->Accounts >right or control-click on Richard. Select "Advanced Options". Is >richard listed as an alias of rjh? If so, remove it, then setup >richard as another user. Save the mbox first if you need the contents. I got excited about this; I had forgotten about those "secret" options. Sadly, though, this shows no aliases for rjh :o( But, thanks for the suggestion... From ipmonger at delamancha.org Wed Jan 23 06:33:15 2008 From: ipmonger at delamancha.org (Jon Boone) Date: Wed Jan 23 06:33:26 2008 Subject: [X-Unix] Re: Leopard Short Name Issue In-Reply-To: <5CFA4E1B-1943-4E81-925B-EE25542E6F17@WEST.NET> References: <5CFA4E1B-1943-4E81-925B-EE25542E6F17@WEST.NET> Message-ID: <7DF64598-5CB6-47DE-BE7E-F7A5915F8C99@delamancha.org> On Jan 22, 2008, at 8:05 PM, Richard Hartman wrote: > ======================= > Jon Boone wrote: > On Jan 22, 2008, at 3:22 PM, Richard Hartman wrote: > > >> The issue: The main admin account on this machine (LONG name > >> "Richard") has become associated in some way with TWO "short > names", > >> "rjh" and "richard". > > >What happens when you try the following: > >% dscl . -read /Users/rjh > > I get LOTS of stuff with the expected info on the "rjh" account > > >% dscl . -read /Users/richard > > This produces... zilch: > > $ dscl . -read /Users/richard > DS Error: -14136 (eDSRecordNotFound) > > Thanks for the effort Jon; but, no joy... Does the following produce any output about "richard"? % dscl . -readall /Users From seasoft at west.net Wed Jan 23 08:00:23 2008 From: seasoft at west.net (Richard Hartman) Date: Wed Jan 23 08:01:20 2008 Subject: [X-Unix] Re: Leopard Short Name Issue In-Reply-To: <7DF64598-5CB6-47DE-BE7E-F7A5915F8C99@delamancha.org> References: <5CFA4E1B-1943-4E81-925B-EE25542E6F17@WEST.NET> <7DF64598-5CB6-47DE-BE7E-F7A5915F8C99@delamancha.org> Message-ID: On Jan 23, 2008, at 6:33 AM, Jon Boone wrote: > > On Jan 22, 2008, at 8:05 PM, Richard Hartman wrote: > >> ======================= >> Jon Boone wrote: >> On Jan 22, 2008, at 3:22 PM, Richard Hartman wrote: >> >> >> The issue: The main admin account on this machine (LONG name >> >> "Richard") has become associated in some way with TWO "short >> names", >> >> "rjh" and "richard". >> >> >What happens when you try the following: >> >% dscl . -read /Users/rjh >> >> I get LOTS of stuff with the expected info on the "rjh" account >> >> >% dscl . -read /Users/richard >> >> This produces... zilch: >> >> $ dscl . -read /Users/richard >> DS Error: -14136 (eDSRecordNotFound) >> >> Thanks for the effort Jon; but, no joy... > > Does the following produce any output about "richard"? > > % dscl . -readall /Users > > No, nothing shows up (in the listing comprising 44 users) but the single admin record with long name "Richard", short name "rjh". Thanks for teaching me about this tool, though. I would never have imagined there were 44 "Users" lurking under the hood on this little stripped-down system! Richard From jerry at ieee.org Wed Jan 23 15:06:36 2008 From: jerry at ieee.org (Jerry Krinock) Date: Wed Jan 23 15:01:47 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? Message-ID: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> I've created a shell script, actually a perl script, and given it a .command extension, so it executes on my Mac when I doubleclick it. I'd like to email it to a non-Terminal-savvy user. But when I attach the file to an email, send it, receive it, and save the attachment to the desktop, the email client (Microsoft Entourage) writes it with octal '644' permissions, so it won't execute. Is there any way around this? (I've tried for the last half hour to wrap it in "perl -e 'MY_SCRIPT'", and then double-wrap it in an AppleScript, with "do shell script". But backslash-escaping these wrappers is very difficult; still no success after 30 minutes of hacking. I suppose this can be done, but it won't be very fun or very readable.) Thanks, Jerry Krinock From seasoft at west.net Wed Jan 23 15:07:45 2008 From: seasoft at west.net (Richard Hartman) Date: Wed Jan 23 15:08:44 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: On Jan 23, 2008, at 3:06 PM, Jerry Krinock wrote: > I've created a shell script, actually a perl script, and given it > a .command extension, so it executes on my Mac when I doubleclick it. > > I'd like to email it to a non-Terminal-savvy user. But when I > attach the file to an email, send it, receive it, and save the > attachment to the desktop, the email client (Microsoft Entourage) > writes it with octal '644' permissions, so it won't execute. > > Is there any way around this? > Can you zip it and attach the zip? (Maybe apple's zip doesn't preserve permissions?) From jakobsen.lasse at euro.apple.com Wed Jan 23 15:10:30 2008 From: jakobsen.lasse at euro.apple.com (Lasse) Date: Wed Jan 23 15:10:38 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: <4F76744E-ABD5-489C-A523-5D3FDB34046E@euro.apple.com> Or send an installer.pkg that'll install a .coomand script onto the users desktop? Den 23/01/2008 kl. 23.07 skrev Richard Hartman: > > On Jan 23, 2008, at 3:06 PM, Jerry Krinock wrote: > >> I've created a shell script, actually a perl script, and given it >> a .command extension, so it executes on my Mac when I doubleclick it. >> >> I'd like to email it to a non-Terminal-savvy user. But when I >> attach the file to an email, send it, receive it, and save the >> attachment to the desktop, the email client (Microsoft Entourage) >> writes it with octal '644' permissions, so it won't execute. >> >> Is there any way around this? >> > > Can you zip it and attach the zip? (Maybe apple's zip doesn't > preserve permissions?) > > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From alex at underwares.org Wed Jan 23 15:11:28 2008 From: alex at underwares.org (=?utf-8?B?QWxleGFuZHJlIEdhdXRoaWVy?=) Date: Wed Jan 23 15:12:13 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: <1485544631-1201129888-cardhu_decombobulator_blackberry.rim.net-2081864142-@bxe037.bisx.prod.on.blackberry> Silly idea: What happens if you sitx or pack it in an archive that preserves permissions? Worse case scenario, put it in a disk image with the correct permissions? Envoy? de mon terminal mobile BlackBerry par le biais du r?seau de Rogers Sans-fil -----Original Message----- From: Jerry Krinock Date: Wed, 23 Jan 2008 15:06:36 To:Mac OS X Unix Subject: [X-Unix] Any way to email a doubleclickable shell script? I've created a shell script, actually a perl script, and given it a .command extension, so it executes on my Mac when I doubleclick it. I'd like to email it to a non-Terminal-savvy user. But when I attach the file to an email, send it, receive it, and save the attachment to the desktop, the email client (Microsoft Entourage) writes it with octal '644' permissions, so it won't execute. Is there any way around this? (I've tried for the last half hour to wrap it in "perl -e 'MY_SCRIPT'", and then double-wrap it in an AppleScript, with "do shell script". But backslash-escaping these wrappers is very difficult; still no success after 30 minutes of hacking. I suppose this can be done, but it won't be very fun or very readable.) Thanks, Jerry Krinock _______________________________________________ X-Unix mailing list X-Unix@listserver.themacintoshguy.com http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From seasoft at west.net Wed Jan 23 15:22:19 2008 From: seasoft at west.net (Richard Hartman) Date: Wed Jan 23 15:22:34 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: On Jan 23, 2008, at 3:07 PM, Richard Hartman wrote: > > On Jan 23, 2008, at 3:06 PM, Jerry Krinock wrote: > >> I've created a shell script, actually a perl script, and given it >> a .command extension, so it executes on my Mac when I doubleclick it. >> >> I'd like to email it to a non-Terminal-savvy user. But when I >> attach the file to an email, send it, receive it, and save the >> attachment to the desktop, the email client (Microsoft Entourage) >> writes it with octal '644' permissions, so it won't execute. >> >> Is there any way around this? >> > > Can you zip it and attach the zip? (Maybe apple's zip doesn't > preserve permissions?) > Of course, I'm sure the canonical way to do this is to tar it, then zip the tiny tarball for attachment. That would surely preserve everything necessary, but would require some "man" effort for us novices :o) From dledger at ivdcs.demon.co.uk Wed Jan 23 09:59:51 2008 From: dledger at ivdcs.demon.co.uk (David Ledger) Date: Wed Jan 23 15:41:03 2008 Subject: [X-Unix] Re: Leopard Short Name Issue In-Reply-To: References: <5CFA4E1B-1943-4E81-925B-EE25542E6F17@WEST.NET> <7DF64598-5CB6-47DE-BE7E-F7A5915F8C99@delamancha.org> Message-ID: At 08:00 -0800 23/1/08, Richard Hartman wrote: >Thanks for teaching me about this tool, though. I would never have >imagined there were 44 "Users" lurking under the hood on this little >stripped-down system! Making individual services run as different users makes it that more difficult for security to be breached. If a bug is found and an outsider can crack in and take over, say, the printing system, they still can't get at the main OS. David -- David Ledger - Freelance Unix Sysadmin in the UK. HP-UX specialist of hpUG technical user group (www.hpug.org.uk) david.ledger@ivdcs.co.uk www.ivdcs.co.uk From jerry at ieee.org Wed Jan 23 16:57:24 2008 From: jerry at ieee.org (Jerry Krinock) Date: Wed Jan 23 16:52:34 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: Thanks for all the ideas. I only tried the simplest idea. Just zip, and it worked! Jerry From bob at andrisfamily.net Wed Jan 23 18:20:33 2008 From: bob at andrisfamily.net (Robert (Bob) P. Andris) Date: Wed Jan 23 18:20:40 2008 Subject: [X-Unix] Leopard Short Name Issue In-Reply-To: <20080123231219.37029918576@listserver.themacintoshguy.com> References: <20080123231219.37029918576@listserver.themacintoshguy.com> Message-ID: > Message: 3 > Date: Tue, 22 Jan 2008 15:56:21 -0800 > From: Scott > Subject: Re: [X-Unix] Leopard Short Name Issue > To: "A place to discuss Mac OS X from the perspective of the command > line." > Message-ID: > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes > > > On Jan 22, 2008, at 12:22 PM, Richard Hartman wrote: > >> I have encountered a bizarre situation that I have been unable to >> resolve. >> >> The machine is an emac running postfix (managed by the Mailserve GUI >> front end to Postfix) under Leopard 10.5.1. >> >> The issue: The main admin account on this machine (LONG name >> "Richard") has become associated in some way with TWO "short names", >> "rjh" and "richard". > > In System Prefs ->Accounts > right or control-click on Richard. Select "Advanced Options". Is > richard listed as an alias of rjh? If so, remove it, then setup > richard as another user. Save the mbox first if you need the contents. > > -- > Scott From ecrist at secure-computing.net Thu Jan 24 06:21:29 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Jan 24 06:21:40 2008 Subject: [X-Unix] Any way to email a doubleclickable shell script? In-Reply-To: References: <38DD084B-7EB2-4A05-B5A8-D0A7B1E70DA4@ieee.org> Message-ID: <9F461064-59CE-409E-A686-2481E5032467@secure-computing.net> On Jan 23, 2008, at 5:22 PM, Richard Hartman wrote: > > On Jan 23, 2008, at 3:07 PM, Richard Hartman wrote: > >> >> On Jan 23, 2008, at 3:06 PM, Jerry Krinock wrote: >> >>> I've created a shell script, actually a perl script, and given it >>> a .command extension, so it executes on my Mac when I doubleclick >>> it. >>> >>> I'd like to email it to a non-Terminal-savvy user. But when I >>> attach the file to an email, send it, receive it, and save the >>> attachment to the desktop, the email client (Microsoft Entourage) >>> writes it with octal '644' permissions, so it won't execute. >>> >>> Is there any way around this? >>> >> >> Can you zip it and attach the zip? (Maybe apple's zip doesn't >> preserve permissions?) >> > > Of course, I'm sure the canonical way to do this is to tar it, then > zip the tiny tarball for attachment. That would surely preserve > everything necessary, but would require some "man" effort for us > novices :o) The command would be: # tar -czf .tgz This will tar everything in , either a directory or list of individual files, and then gzip the archive. Replace with the name you want to save your .tgz file as. HTH ----- Eric F Crist Secure Computing Networks From choffman at eclimb.net Thu Jan 24 08:06:54 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 08:07:02 2008 Subject: [X-Unix] rsync help Message-ID: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Hi There, I'm trying to backup my music directory to a network drive. The music directory is quite large (176.81GB). My plan is write a AppleScript and schedule it in iCal. I've done this before and it works well. I've been experimenting with rsync and I can't seem to get it work correctly. It brings over the directories but none of the files. I also receive this error message: failed: Operation not supported (45) Sample: rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ /Volumes/ teakettle/Music Any help would be great. I'm open to other ideas too. Thanks, Craig _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ From seasoft at west.net Thu Jan 24 08:25:25 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 08:25:55 2008 Subject: [X-Unix] rsync help In-Reply-To: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: <9D592B91-CAFE-4D7F-87B2-39F3AF1618CA@west.net> On Jan 24, 2008, at 8:06 AM, Craig Hoffman wrote: > Hi There, > I'm trying to backup my music directory to a network drive. The > music directory is quite large (176.81GB). My plan is write a > AppleScript and schedule it in iCal. I've done this before and it > works well. I've been experimenting with rsync and I can't seem to > get it work correctly. It brings over the directories but none of > the files. I also receive this error message: failed: Operation not > supported (45) > > Sample: > rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ /Volumes/ > teakettle/Music > > Any help would be great. I'm open to other ideas too. > Here is what I use: $ rsync -avz /source_directory/ /destination_directory/ To see only what would be copied without actually doing the copy, use the -n flag thusly: $ rsync -navz /source_directory/ /destination_directory/ The -a flag is the one that captures most of what you need, I think; check the man page. Good luck, Richard From wingedpower at gmail.com Thu Jan 24 08:37:15 2008 From: wingedpower at gmail.com (Wing Wong) Date: Thu Jan 24 08:38:56 2008 Subject: [X-Unix] rsync help In-Reply-To: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: <7097bd8c0801240837y49014694x65616dc487dfb902@mail.gmail.com> Some thoughts: 1) Simplify your command options first: rsync -arv /......./ /....../ See if that doesn't work. 2) Check that the destination and source volumes are similar filesystems. While differing vol types(hfs/xfs/ext3/ntfs/fat32/etc) have not posed copyinh problems, they have posed problems when trying to sync up ownership/permissions. Ie, fat32 doesn't support ownership. 3) Test on a smaller subfolder first. You may be exceeding some limit, or hitting a folder that is protected in some way? 4) Perhaps rsync directly to the remote system if it is a computer. rsync -arv /......./ user@host:/......./ Good luck! Wing On 1/24/08, Craig Hoffman wrote: > Hi There, > I'm trying to backup my music directory to a network drive. The music > directory is quite large (176.81GB). My plan is write a AppleScript > and schedule it in iCal. I've done this before and it works well. > I've been experimenting with rsync and I can't seem to get it work > correctly. It brings over the directories but none of the files. I > also receive this error message: failed: Operation not supported (45) > > Sample: > rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ /Volumes/ > teakettle/Music > > Any help would be great. I'm open to other ideas too. > > Thanks, > Craig > _______________________ > Craig Hoffman > iChat / AIM: m0untaind0g > _______________________ > > > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > -- Wing Wong wingedpower@gmail.com From ecrist at secure-computing.net Thu Jan 24 09:03:16 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Jan 24 09:03:27 2008 Subject: [X-Unix] rsync help In-Reply-To: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: On Jan 24, 2008, at 10:06 AM, Craig Hoffman wrote: > Hi There, > I'm trying to backup my music directory to a network drive. The > music directory is quite large (176.81GB). My plan is write a > AppleScript and schedule it in iCal. I've done this before and it > works well. I've been experimenting with rsync and I can't seem to > get it work correctly. It brings over the directories but none of > the files. I also receive this error message: failed: Operation not > supported (45) > > Sample: > rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ /Volumes/ > teakettle/Music > > Any help would be great. I'm open to other ideas too. > > Thanks, > Craig Craig, I do something similar for my entire home directories on the laptops in our house. I actually use cron to schedule the backups, which occur every hour (when the laptop isn't sleeping). My rsync script does a bunch of extra logging stuff I'll leave out here, but this should point you in the right direction: rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- exclude=".Trashes" : The above script makes an *exact* copy of what's in my home directory, and doesn't transfer the few big files I may have, including .cdr and .iso images. I'm also excluding the .Trash and .Trashes directorys (why transfer my garbage?) Caches, .Spotlight-V100 are also ignored, as this data can be easily regenerated upon a restore. The av options being passed are really all you should need. All that being said, I would sum up your script with: rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music If you, or anyone, want to see my entire script and the cron entry, I'd be willing to share. ----- Eric F Crist Secure Computing Networks From seasoft at west.net Thu Jan 24 09:15:45 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 09:15:58 2008 Subject: [X-Unix] rsync help In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> On Jan 24, 2008, at 9:03 AM, Eric F Crist wrote: . snip . . > If you, or anyone, want to see my entire script and the cron entry, > I'd be willing to share. Eric, I for one would love to peek into these details of your private life ;o) This kind of user-data synchronization is exactly what I am fussing with at the moment. Richard From dan.derusha at schawk.com Thu Jan 24 09:18:56 2008 From: dan.derusha at schawk.com (Dan DeRusha) Date: Thu Jan 24 09:19:06 2008 Subject: [X-Unix] rsync help In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: <142843A0-4A8F-4CD0-B345-B070D83C77EB@schawk.com> Eric- I would be interested in your script and cron entry. Thanks for sharing, this will help with a project coming up. Dan On Jan 24, 2008, at 11:03 AM, Eric F Crist wrote: > On Jan 24, 2008, at 10:06 AM, Craig Hoffman wrote: > >> Hi There, >> I'm trying to backup my music directory to a network drive. The >> music directory is quite large (176.81GB). My plan is write a >> AppleScript and schedule it in iCal. I've done this before and it >> works well. I've been experimenting with rsync and I can't seem to >> get it work correctly. It brings over the directories but none of >> the files. I also receive this error message: failed: Operation >> not supported (45) >> >> Sample: >> rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ / >> Volumes/teakettle/Music >> >> Any help would be great. I'm open to other ideas too. >> >> Thanks, >> Craig > > Craig, > > I do something similar for my entire home directories on the laptops > in our house. I actually use cron to schedule the backups, which > occur every hour (when the laptop isn't sleeping). > > My rsync script does a bunch of extra logging stuff I'll leave out > here, but this should point you in the right direction: > rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- > exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- > exclude=".Trashes" : > > The above script makes an *exact* copy of what's in my home > directory, and doesn't transfer the few big files I may have, > including .cdr and .iso images. I'm also excluding the .Trash > and .Trashes directorys (why transfer my garbage?) > Caches, .Spotlight-V100 are also ignored, as this data can be easily > regenerated upon a restore. The av options being passed are really > all you should need. > > All that being said, I would sum up your script with: > > rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music > > If you, or anyone, want to see my entire script and the cron entry, > I'd be willing to share. > ----- > Eric F Crist > Secure Computing Networks > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From choffman at eclimb.net Thu Jan 24 09:29:43 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 09:29:59 2008 Subject: [X-Unix] rsync help In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> Message-ID: <838908E5-115E-4D84-9DA0-348F61069CA8@eclimb.net> Thanks - I'll give this a try and report back. _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 10:03 AM, Eric F Crist wrote: > On Jan 24, 2008, at 10:06 AM, Craig Hoffman wrote: > >> Hi There, >> I'm trying to backup my music directory to a network drive. The >> music directory is quite large (176.81GB). My plan is write a >> AppleScript and schedule it in iCal. I've done this before and it >> works well. I've been experimenting with rsync and I can't seem to >> get it work correctly. It brings over the directories but none of >> the files. I also receive this error message: failed: Operation >> not supported (45) >> >> Sample: >> rsync -xrlptgoEv --ignore-existing /Volumes/Twilight/Music/ / >> Volumes/teakettle/Music >> >> Any help would be great. I'm open to other ideas too. >> >> Thanks, >> Craig > > Craig, > > I do something similar for my entire home directories on the laptops > in our house. I actually use cron to schedule the backups, which > occur every hour (when the laptop isn't sleeping). > > My rsync script does a bunch of extra logging stuff I'll leave out > here, but this should point you in the right direction: > rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- > exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- > exclude=".Trashes" : > > The above script makes an *exact* copy of what's in my home > directory, and doesn't transfer the few big files I may have, > including .cdr and .iso images. I'm also excluding the .Trash > and .Trashes directorys (why transfer my garbage?) > Caches, .Spotlight-V100 are also ignored, as this data can be easily > regenerated upon a restore. The av options being passed are really > all you should need. > > All that being said, I would sum up your script with: > > rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music > > If you, or anyone, want to see my entire script and the cron entry, > I'd be willing to share. > ----- > Eric F Crist > Secure Computing Networks > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From ecrist at secure-computing.net Thu Jan 24 09:39:46 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Jan 24 09:39:53 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> Message-ID: <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> Since a few people showed interest, I'll spam the list with my solution for incremental backups of the mac in my life. The major problem I had was that most of the macs in my life are laptops. That means two primary things: 1) They go to sleep when I do. ;) 2) They roam off-network. Since I already have a server network setup at home (secure- computing.net), I simply made use of my current backup server's hard disk space, and rsync. The first step was to create an easy backup script, that was clickable for a user to manually backup their files. *side note, when I say user, I mean my beloved fiance ;)* This script contained a single line: rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- exclude=".Trashes" backup-server:/usr/backups/`hostname` All the user needed to do was click on the script and it would backup any changes to their files. At this point, her hard drive crashed. Easy enough, we had backups. Well, the original backups from my testing. 6 months before. Damn. So, we had the need to automate. I tried iCal, but if the laptop was asleep for 3 days, it would try to backup three times, and we got an iCal alert for each day. My solution was to use the oft-unused (on Macs) cron daemon. I added the following entry to her crontab: 00 * * * * /Users//backup.command This, coupled with the backup.command file I'll paste below, results in her laptop backing itself up every hour, incrementally. This works great, as she's often (2-3 times a day, on average) using her laptop as the hour rolls over. Since she mostly surfs the web and checks email, the backup actually takes about 60 seconds to 2 minutes. As I have found, this script works great on my laptop as well, even though my system roams with me to Starbucks, the office, and elsewhere. That being said, my backups take about 1 minute to 5 minutes. The big thing when remote from the backup server is to have the --exclude="Caches". These, especially Safari, can get rather large. On my system, I've coupled GeekTool (http://projects.tynsoe.org/en/geektool/ ) to tail the log file from my backups, so I can keep track of them throughout the day. Without going further into GeekTool, here's the script I've got for that: echo "System Backup Log:"; tail -n 20 /Users/ecrist/.logs/ `date "+%m"`/`date "+%d-%H"`.log ; echo "\nUpdated at `date`." So, here's my minimal backup.command script: #!/bin/sh month=`date "+%m"` file=`date "+%d-%H"` # dont run if it's already running! if [ -e "/tmp/back.pid" ] then echo "Backups already running as PID `cat /tmp/back.pid`. Aborting..." else echo $$ > /tmp/back.pid ## ALL ONE LINE BETWEEN ## rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- exclude=".Trashes" backup-server:/usr/backups/`hostname` > /Users/ ecrist/.logs/$month/$file.log 2>&1 ## ALL ONE LINE BETWEEN ^^ ## rm /tmp/back.pid fi echo "Finished at `date`" >> /Users/ecrist/.logs/$month/$file.log One final note. My backup server has a user account for everyone that's going to be backing up their system. Their backup directory has 0700 permissions for security's sake. Since we're backing up laptops mostly, the `hostname` part of the rsync command works fine. This could be clarified for multiuser systems by running the cron job as root on the Macs, or simply creating a new rsync command such as: rsync -av --delete ~/ backup-server:/usr/backups/`hostname`/ `whoami` Just make sure in this case that their user belongs to a group that has rwx access to the `hostname` directory. Glad I could contribute something! If this is confusing or you need help, please don't hesitate to ask! ----- Eric F Crist Secure Computing Networks From choffman at eclimb.net Thu Jan 24 11:10:18 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 11:10:26 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> Message-ID: <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> This is strange... It looks like the files are being moved. But there invisible. If I use Transmit and choose the network drive and select "Show Invisible Files", they appear. For a test I dragged a file over using the Finder and it appears. Somehow using rsync is making them invisible. I'm using this: rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music Any ideas? The drive is a LaCle Ethernet Big Disk, formated XFS _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 10:39 AM, Eric F Crist wrote: > Since a few people showed interest, I'll spam the list with my > solution for incremental backups of the mac in my life. > > The major problem I had was that most of the macs in my life are > laptops. That means two primary things: > 1) They go to sleep when I do. ;) > 2) They roam off-network. > > Since I already have a server network setup at home (secure- > computing.net), I simply made use of my current backup server's hard > disk space, and rsync. > > The first step was to create an easy backup script, that was > clickable for a user to manually backup their files. *side note, > when I say user, I mean my beloved fiance ;)* > > This script contained a single line: > rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- > exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- > exclude=".Trashes" backup-server:/usr/backups/`hostname` > > All the user needed to do was click on the script and it would > backup any changes to their files. > > At this point, her hard drive crashed. Easy enough, we had > backups. Well, the original backups from my testing. 6 months > before. Damn. > > So, we had the need to automate. I tried iCal, but if the laptop > was asleep for 3 days, it would try to backup three times, and we > got an iCal alert for each day. My solution was to use the oft- > unused (on Macs) cron daemon. I added the following entry to her > crontab: > > 00 * * * * /Users//backup.command > > This, coupled with the backup.command file I'll paste below, results > in her laptop backing itself up every hour, incrementally. This > works great, as she's often (2-3 times a day, on average) using her > laptop as the hour rolls over. Since she mostly surfs the web and > checks email, the backup actually takes about 60 seconds to 2 minutes. > > As I have found, this script works great on my laptop as well, even > though my system roams with me to Starbucks, the office, and > elsewhere. That being said, my backups take about 1 minute to 5 > minutes. The big thing when remote from the backup server is to > have the --exclude="Caches". These, especially Safari, can get > rather large. > > On my system, I've coupled GeekTool (http://projects.tynsoe.org/en/geektool/ > ) to tail the log file from my backups, so I can keep track of them > throughout the day. Without going further into GeekTool, here's the > script I've got for that: > echo "System Backup Log:"; tail -n 20 /Users/ecrist/.logs/ > `date "+%m"`/`date "+%d-%H"`.log ; echo "\nUpdated at `date`." > > So, here's my minimal backup.command script: > > #!/bin/sh > month=`date "+%m"` > file=`date "+%d-%H"` > # dont run if it's already running! > if [ -e "/tmp/back.pid" ] > then > echo "Backups already running as PID `cat /tmp/back.pid`. > Aborting..." > else > echo $$ > /tmp/back.pid > ## ALL ONE LINE BETWEEN ## > rsync -av --delete ~/ --exclude="Caches" --exclude="*.cdr" -- > exclude="*.iso" --exclude=".Trash" --exclude=".Spotlight-V100" -- > exclude=".Trashes" backup-server:/usr/backups/`hostname` > /Users/ > ecrist/.logs/$month/$file.log 2>&1 > ## ALL ONE LINE BETWEEN ^^ ## > rm /tmp/back.pid > fi > echo "Finished at `date`" >> /Users/ecrist/.logs/$month/$file.log > > > One final note. My backup server has a user account for everyone > that's going to be backing up their system. Their backup directory > has 0700 permissions for security's sake. Since we're backing up > laptops mostly, the `hostname` part of the rsync command works > fine. This could be clarified for multiuser systems by running the > cron job as root on the Macs, or simply creating a new rsync command > such as: > > rsync -av --delete ~/ backup-server:/usr/backups/ > `hostname`/`whoami` > > Just make sure in this case that their user belongs to a group that > has rwx access to the `hostname` directory. > > Glad I could contribute something! If this is confusing or you need > help, please don't hesitate to ask! > ----- > Eric F Crist > Secure Computing Networks > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From seasoft at west.net Thu Jan 24 11:22:58 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 11:23:06 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> Message-ID: On Jan 24, 2008, at 11:10 AM, Craig Hoffman wrote: > This is strange... It looks like the files are being moved. But > there invisible. If I use Transmit and choose the network drive and > select "Show Invisible Files", they appear. > > For a test I dragged a file over using the Finder and it appears. > Somehow using rsync is making them invisible. > > I'm using this: > rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music > > Any ideas? > > The drive is a LaCle Ethernet Big Disk, formated XFS > Which OS? Leopard has introduced some new fire/directory metadata ("ls -la" shows some of these changes by the appearance of an "@" item at the end of the permissions strings for files with metadata). Inferring how this might impact the use of rsync from leopard<- >leopard or leapord<->tiger is waaaay beyond my pay grade. Richard From seasoft at west.net Thu Jan 24 11:24:31 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 11:24:39 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> Message-ID: <4FBFB9FE-388C-4ED2-B5CC-1574AB2B0822@west.net> Sorry, that's "file/directory" metadata in the comment below. Sorry for the noise. On Jan 24, 2008, at 11:22 AM, Richard Hartman wrote: > > On Jan 24, 2008, at 11:10 AM, Craig Hoffman wrote: > >> This is strange... It looks like the files are being moved. But >> there invisible. If I use Transmit and choose the network drive >> and select "Show Invisible Files", they appear. >> >> For a test I dragged a file over using the Finder and it appears. >> Somehow using rsync is making them invisible. >> >> I'm using this: >> rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music >> >> Any ideas? >> >> The drive is a LaCle Ethernet Big Disk, formated XFS >> > > Which OS? > > Leopard has introduced some new fire/directory metadata ("ls -la" > shows some of these changes by the appearance of an "@" item at the > end of the permissions strings for files with metadata). > > Inferring how this might impact the use of rsync from leopard<- > >leopard or leapord<->tiger is waaaay beyond my pay grade. > > Richard > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > From choffman at eclimb.net Thu Jan 24 11:56:19 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 11:56:38 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> Message-ID: <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> > Which OS? Leopard 5.1 What's still strange, I tried using rsync to move a few image (jpg) using the E flag and it worked. I was able to view the files in the Finder. >> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music Then I tried it on some mp3's / music files using the same flags and the files became invisible again. What's up with that? _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 12:22 PM, Richard Hartman wrote: > > On Jan 24, 2008, at 11:10 AM, Craig Hoffman wrote: > >> This is strange... It looks like the files are being moved. But >> there invisible. If I use Transmit and choose the network drive >> and select "Show Invisible Files", they appear. >> >> For a test I dragged a file over using the Finder and it appears. >> Somehow using rsync is making them invisible. >> >> I'm using this: >> rsync -av /Volumes/Twilight/Music/ /Volumes/teakettle/Music >> >> Any ideas? >> >> The drive is a LaCle Ethernet Big Disk, formated XFS >> > > Which OS? > > Leopard has introduced some new fire/directory metadata ("ls -la" > shows some of these changes by the appearance of an "@" item at the > end of the permissions strings for files with metadata). > > Inferring how this might impact the use of rsync from leopard<- > >leopard or leapord<->tiger is waaaay beyond my pay grade. > > Richard > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From seasoft at west.net Thu Jan 24 12:20:43 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 12:20:50 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> Message-ID: <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> On Jan 24, 2008, at 11:56 AM, Craig Hoffman wrote: >> Which OS? > Leopard 5.1 > > What's still strange, I tried using rsync to move a few image (jpg) > using the E flag and it worked. I was able to view the files in the > Finder. >>> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music > > Then I tried it on some mp3's / music files using the same flags and > the files became invisible again. What's up with that? > You're not getting trapped by finder sluggishness are you? This happens to me often when doing file transfers in terminal. To test, just restart the finder to see if the files magically "appear". From choffman at eclimb.net Thu Jan 24 13:06:27 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 13:06:34 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> Message-ID: Nope its not the Finder. Does it matter that the files (music) are stored on a separate volume / drive (Twilight)? _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 1:20 PM, Richard Hartman wrote: > > On Jan 24, 2008, at 11:56 AM, Craig Hoffman wrote: > >>> Which OS? >> Leopard 5.1 >> >> What's still strange, I tried using rsync to move a few image (jpg) >> using the E flag and it worked. I was able to view the files in >> the Finder. >>>> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music >> >> Then I tried it on some mp3's / music files using the same flags >> and the files became invisible again. What's up with that? >> > > You're not getting trapped by finder sluggishness are you? This > happens to me often when doing file transfers in terminal. > > To test, just restart the finder to see if the files magically > "appear". > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From seasoft at west.net Thu Jan 24 13:43:28 2008 From: seasoft at west.net (Richard Hartman) Date: Thu Jan 24 13:43:37 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> Message-ID: <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> On Jan 24, 2008, at 1:06 PM, Craig Hoffman wrote: > Nope its not the Finder. > > Does it matter that the files (music) are stored on a separate > volume / drive (Twilight)? Not as far as I know. Are the volumes just attached disks (i.e., firewire or usb) or are they volumes mounted from networked computers running a different OS or file system? If so, there might be some rsync issues in that regard. > > > > On Jan 24, 2008, at 1:20 PM, Richard Hartman wrote: > >> >> On Jan 24, 2008, at 11:56 AM, Craig Hoffman wrote: >> >>>> Which OS? >>> Leopard 5.1 >>> >>> What's still strange, I tried using rsync to move a few image >>> (jpg) using the E flag and it worked. I was able to view the >>> files in the Finder. >>>>> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music >>> >>> Then I tried it on some mp3's / music files using the same flags >>> and the files became invisible again. What's up with that? >>> >> >> You're not getting trapped by finder sluggishness are you? This >> happens to me often when doing file transfers in terminal. >> >> To test, just restart the finder to see if the files magically >> "appear". >> >> From heitke at usa.net Thu Jan 24 16:38:50 2008 From: heitke at usa.net (Steve Heitke) Date: Thu Jan 24 16:38:56 2008 Subject: [X-Unix] Re: using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> Message-ID: <20080125003850.GA25106@usa.net> On Thu, Jan 24, 2008 at 12:56:19PM -0700, Craig Hoffman wrote: >>Which OS? >Leopard 5.1 > >What's still strange, I tried using rsync to move a few image (jpg) >using the E flag and it worked. I was able to view the files in the >Finder. >>>rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music > >Then I tried it on some mp3's / music files using the same flags and >the files became invisible again. What's up with that? >>> >>>The drive is a LaCle Ethernet Big Disk, formated XFS Is it the drive? There was an issue with the Western Digital NAS drives hiding files that have DRM so that network users couldn't share files. -Steve -- Steve Heitke heitke@usa.net From choffman at eclimb.net Thu Jan 24 17:04:37 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 17:26:54 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> Message-ID: <2B03231F-14F3-4532-BA80-D8458D22D300@eclimb.net> Follow up -- Well, I could not figure out why rsync was producing invisible files when being transfered from an internal drive (other than OS drive) to a network drive. I even tried downloading arRsync, a GUI rsync app. Even with that, it was producing invisible files. The work around solution was to download Deja Vu, a backup app, which by the way has been updated for Leopard. It allows me to backup to a network drive, set a schedule and so forth. This will work for the mean time... _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 2:43 PM, Richard Hartman wrote: > > On Jan 24, 2008, at 1:06 PM, Craig Hoffman wrote: > >> Nope its not the Finder. >> >> Does it matter that the files (music) are stored on a separate >> volume / drive (Twilight)? > > Not as far as I know. Are the volumes just attached disks (i.e., > firewire or usb) or are they volumes mounted from networked > computers running a different OS or file system? If so, there might > be some rsync issues in that regard. > >> >> >> >> On Jan 24, 2008, at 1:20 PM, Richard Hartman wrote: >> >>> >>> On Jan 24, 2008, at 11:56 AM, Craig Hoffman wrote: >>> >>>>> Which OS? >>>> Leopard 5.1 >>>> >>>> What's still strange, I tried using rsync to move a few image >>>> (jpg) using the E flag and it worked. I was able to view the >>>> files in the Finder. >>>>>> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music >>>> >>>> Then I tried it on some mp3's / music files using the same flags >>>> and the files became invisible again. What's up with that? >>>> >>> >>> You're not getting trapped by finder sluggishness are you? This >>> happens to me often when doing file transfers in terminal. >>> >>> To test, just restart the finder to see if the files magically >>> "appear". >>> >>> > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From choffman at eclimb.net Thu Jan 24 19:45:45 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Thu Jan 24 19:46:21 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> References: <17267950-4334-487D-9343-3ECB7E86AFC4@eclimb.net> <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> Message-ID: Follow up -- Well, I could not figure out why rsync was producing invisible / hidden files when being transfered from an internal drive (other than OS drive) to a network drive. I even tried downloading arRsync, a GUI rsync app. Even with that, it was producing invisible files. I have a feeling Time Machine is some how interfering with the network transfer. The work around solution was to download Deja Vu, a backup app. It allows me to backup to a network drive, set a schedule and so forth. This will work for the mean time... _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 24, 2008, at 2:43 PM, Richard Hartman wrote: > > On Jan 24, 2008, at 1:06 PM, Craig Hoffman wrote: > >> Nope its not the Finder. >> >> Does it matter that the files (music) are stored on a separate >> volume / drive (Twilight)? > > Not as far as I know. Are the volumes just attached disks (i.e., > firewire or usb) or are they volumes mounted from networked > computers running a different OS or file system? If so, there might > be some rsync issues in that regard. > >> >> >> >> On Jan 24, 2008, at 1:20 PM, Richard Hartman wrote: >> >>> >>> On Jan 24, 2008, at 11:56 AM, Craig Hoffman wrote: >>> >>>>> Which OS? >>>> Leopard 5.1 >>>> >>>> What's still strange, I tried using rsync to move a few image >>>> (jpg) using the E flag and it worked. I was able to view the >>>> files in the Finder. >>>>>> rsync -avE /Volumes/Twilight/Music/ /Volumes/teakettle/Music >>>> >>>> Then I tried it on some mp3's / music files using the same flags >>>> and the files became invisible again. What's up with that? >>>> >>> >>> You're not getting trapped by finder sluggishness are you? This >>> happens to me often when doing file transfers in terminal. >>> >>> To test, just restart the finder to see if the files magically >>> "appear". >>> >>> > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From luomat at gmail.com Fri Jan 25 07:18:12 2008 From: luomat at gmail.com (TjL) Date: Fri Jan 25 07:19:25 2008 Subject: [X-Unix] Calling Applescript alarm from script Message-ID: Hey all. I've written a script which will check the school closings webpage for my kid's school and email me if it finds something. That part is done. However, what I would really like to do is have it pop up some kind of alert window on my Mac with some kind of sound which keeps repeating until I acknowledge the window. Anyone have any ideas how to do that? I'm assuming it might be possible in Applescript, but I really don't know anything about AS, so any pointers would be welcome. Thanks! TjL From billwhite at mac.com Fri Jan 25 08:18:35 2008 From: billwhite at mac.com (Bill White) Date: Fri Jan 25 08:19:01 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: Message-ID: On 1/25/08 10:18 AM, TjL wrote: > However, what I would really like to do is have it pop up some kind of > alert window on my Mac with some kind of sound which keeps repeating > until I acknowledge the window. This would do the persistent alarm part: repeat tell application (path to frontmost application as Unicode text) display dialog "School is closed [change message to suit]" buttons "Cancel" default button 1 giving up after 3 -- this should all be on the same line beep 3 end tell end repeat HTH, Bill From macmonster at myrealbox.com Fri Jan 25 14:13:10 2008 From: macmonster at myrealbox.com (Stroller) Date: Fri Jan 25 14:13:48 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: References: Message-ID: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> On 25 Jan 2008, at 15:18, TjL wrote: > ... I've written a script which will check the school closings > webpage for my kid's school and email me if it finds something. > > That part is done. > > However, what I would really like to do is have it pop up some kind of > alert window on my Mac with some kind of sound which keeps repeating > until I acknowledge the window. > > Anyone have any ideas how to do that? I'm assuming it might be > possible in Applescript, but I really don't know anything about AS, so > any pointers would be welcome. Set a rule in Mail.app, so that if "From:" equals "My Notify Script " then play sound "klaxxon". Stroller. From ecrist at secure-computing.net Fri Jan 25 15:05:02 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Fri Jan 25 15:05:13 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> References: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> Message-ID: <611357B5-6062-455A-9F08-F314CD3C432D@secure-computing.net> On Jan 25, 2008, at 4:13 PM, Stroller wrote: > > On 25 Jan 2008, at 15:18, TjL wrote: >> >> However, what I would really like to do is have it pop up some kind >> of >> alert window on my Mac with some kind of sound which keeps repeating >> until I acknowledge the window. > > Set a rule in Mail.app, so that if "From:" equals "My Notify Script > " then play sound "klaxxon". That only works if Mail.app happens to be running. If Mail.app isn't running, messages aren't being received, and filters aren't being processed. ----- Eric F Crist Secure Computing Networks From list-themacintoshguy at fsck.net Fri Jan 25 15:42:16 2008 From: list-themacintoshguy at fsck.net (Eugene) Date: Fri Jan 25 15:42:26 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: References: <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> Message-ID: <20080125234216.GA1507@Macintosh-2.local> On Thu, Jan 24, 2008 at 09:45:45PM CST, Craig Hoffman wrote: > > Follow up -- Well, I could not figure out why rsync was producing invisible > / hidden files when being transfered from an internal drive (other than OS > drive) to a network drive. I even tried downloading arRsync, a GUI rsync > app. Even with that, it was producing invisible files. I have a feeling > Time Machine is some how interfering with the network transfer. The work > around solution was to download Deja Vu, a backup app. It allows me to > backup to a network drive, set a schedule and so forth. This will work > for the mean time... Freaky. Have you tried reducing this down to a single isolated example that can be reproduced? Definitely sounds like a valid bug. -- Eugene http://www.coxar.pwp.blueyonder.co.uk/ From luomat at gmail.com Fri Jan 25 15:47:18 2008 From: luomat at gmail.com (TjL) Date: Fri Jan 25 15:47:24 2008 Subject: [X-Unix] Sending mail from the commandline? Message-ID: What's the easiest way to setup my iMac running 10.5.1 so that I can send mail from the commandline, ala cat "Hello World" |Mail -s "Test" luomat@gmail.com I'm really hoping that I don't have to go through and configure sendmail just for this! TjL From groups at pursued-with.net Fri Jan 25 16:15:14 2008 From: groups at pursued-with.net (Kevin Stevens) Date: Fri Jan 25 16:17:04 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: On Jan 25, 2008, at 15:47, TjL wrote: > What's the easiest way to setup my iMac running 10.5.1 so that I can > send mail from the commandline, ala > > cat "Hello World" |Mail -s "Test" luomat@gmail.com > > I'm really hoping that I don't have to go through and configure > sendmail just for this! man mail KeS From luomat at gmail.com Fri Jan 25 17:05:43 2008 From: luomat at gmail.com (TjL) Date: Fri Jan 25 17:05:51 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: On 1/25/08, Kevin Stevens wrote: > > On Jan 25, 2008, at 15:47, TjL wrote: > > > What's the easiest way to setup my iMac running 10.5.1 so that I can > > send mail from the commandline, ala > > > > cat "Hello World" |Mail -s "Test" luomat@gmail.com > > > > I'm really hoping that I don't have to go through and configure > > sendmail just for this! > > man mail Um, was that supposed to be helpful? I know the command, I don't know what you're suggesting, so it ends up being a waste of time. It also doesn't answer the question I asked. It's not so much as the command to use as to "How to get it off my iMac and onto the internet." Perhaps that was my fault for not being clear. Messages sent using the command I sent gives no error message but the message doesn't ever show up at my GMail account. TjL From groups at pursued-with.net Fri Jan 25 18:00:09 2008 From: groups at pursued-with.net (Kevin Stevens) Date: Fri Jan 25 18:00:15 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: On Fri, 25 Jan 2008, TjL wrote: > On 1/25/08, Kevin Stevens wrote: >> >> On Jan 25, 2008, at 15:47, TjL wrote: >> >>> What's the easiest way to setup my iMac running 10.5.1 so that I can >>> send mail from the commandline, ala >>> >>> cat "Hello World" |Mail -s "Test" luomat@gmail.com >>> >>> I'm really hoping that I don't have to go through and configure >>> sendmail just for this! >> >> man mail > > Um, was that supposed to be helpful? Yes, actually, it was. However, I misread your command as IMail-something and assumed you were running a different application and weren't aware of mail.. So, no harm, no foul. > I know the command, I don't know what you're suggesting, so it ends up > being a waste of time. > It also doesn't answer the question I asked. It's not so much as the > command to use as to "How to get it off my iMac and onto the > internet." Perhaps that was my fault for not being clear. Messages > sent using the command I sent gives no error message but the message > doesn't ever show up at my GMail account. I can tell you that mail works on a fresh Leopard default install, because that's what I'm typing on. postfix runs on a per-minute schedule, picks it up, and delivers it to gmail. Details are in /var/log/mail.log. What happens at gmail is another story; it may be flagged by some spam filter there and not delivered, but according to my log it was accepted there. I tested this from an interactive session (mail myname@gmail.com; enter stuff, . on blank line to end). I know you can feed mail in some similar way; because I've done it in the past, but I don't recall the details at the moment, which is why I just pointed you at the man page. But mail does work out of the box, and postfix does work for as an MTA. You have to set it up to receive, of course. KeS From macmonster at myrealbox.com Sat Jan 26 01:49:18 2008 From: macmonster at myrealbox.com (Stroller) Date: Sat Jan 26 01:49:24 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: <611357B5-6062-455A-9F08-F314CD3C432D@secure-computing.net> References: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> <611357B5-6062-455A-9F08-F314CD3C432D@secure-computing.net> Message-ID: <0884882E-965B-4486-B877-CB4D21513EA1@myrealbox.com> On 25 Jan 2008, at 23:05, Eric F Crist wrote: > On Jan 25, 2008, at 4:13 PM, Stroller wrote: >> On 25 Jan 2008, at 15:18, TjL wrote: >>> >>> However, what I would really like to do is have it pop up some >>> kind of >>> alert window on my Mac with some kind of sound which keeps repeating >>> until I acknowledge the window. >> >> Set a rule in Mail.app, so that if "From:" equals "My Notify >> Script " then play sound "klaxxon". > > That only works if Mail.app happens to be running. If Mail.app > isn't running, messages aren't being received, and filters aren't > being processed. Yeah, well, the script only runs if the computer is switched on, and other notifications are only useful if the computer has monitor &/or speakers connected to it, &/or someone is logged into the machine. I assumed that the script was written in Bash, piping curl to grep to sendmail - it may be blinkered of me, but I find this the most "obvious" way to solve that part of the problem already described by TjL - and I would find it clumsy to mix shell script & AppleScript. Here any script that is run by a schedule is run on the headless server in the cupboard under the stairs - I'm sure that'll be switched on at any time, which I can't say of any given desktop machine. Besides, if I'm at a computer then my mail is open. For me - your milage may vary - it's just the most logical way to be notified of stuff that's going on. Finally - I considered writing this in my original response - no language which we discuss here is the best one for the task. The easiest programming syntax is "hey, kid! make sure you check this webpage every day - it tells you if you get a day off school." Stroller. From macmonster at myrealbox.com Sat Jan 26 01:52:25 2008 From: macmonster at myrealbox.com (Stroller) Date: Sat Jan 26 01:52:33 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: On 26 Jan 2008, at 02:00, Kevin Stevens wrote: > On Fri, 25 Jan 2008, TjL wrote: >> On 1/25/08, Kevin Stevens wrote: >>> >>> On Jan 25, 2008, at 15:47, TjL wrote: >>> >>>> What's the easiest way to setup my iMac running 10.5.1 so that I >>>> can >>>> send mail from the commandline, ala >>>> >>>> cat "Hello World" |Mail -s "Test" luomat@gmail.com >>>> >>>> I'm really hoping that I don't have to go through and configure >>>> sendmail just for this! >>> >>> man mail >> >> Um, was that supposed to be helpful? > > Yes, actually, it was. However, I misread your command as IMail- > something and assumed you were running a different application and > weren't aware of mail. TjL: please note that this is an entirely logical assumption to come to, considering your capitalisation of the command `Mail`. Stroller. From dledger at ivdcs.demon.co.uk Sat Jan 26 03:23:43 2008 From: dledger at ivdcs.demon.co.uk (David Ledger) Date: Sat Jan 26 03:46:48 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: At 09:52 +0000 26/1/08, Stroller wrote: >On 26 Jan 2008, at 02:00, Kevin Stevens wrote: >> Yes, actually, it was. However, I misread your command as >>IMail-something and assumed you were running a different >>application and weren't aware of mail. > >TjL: please note that this is an entirely logical assumption to come >to, considering your capitalisation of the command `Mail`. At least one mainstream Unix has, or had, a 'Mail' which is/was an enhanced version of 'mail' in the same way that 'mailx' is. Of course, with a case insensitive filesystem that's no help. David -- David Ledger - Freelance Unix Sysadmin in the UK. HP-UX specialist of hpUG technical user group (www.hpug.org.uk) david.ledger@ivdcs.co.uk www.ivdcs.co.uk From choffman at eclimb.net Sat Jan 26 06:54:51 2008 From: choffman at eclimb.net (Craig Hoffman) Date: Sat Jan 26 06:55:00 2008 Subject: [X-Unix] using rsync to automatically backup home directories (was RE: rsync help) In-Reply-To: <20080125234216.GA1507@Macintosh-2.local> References: <8A055370-D74F-4017-A9B2-30C094D4F6EE@west.net> <124391D7-170C-4212-A16E-5B247B7F4D71@secure-computing.net> <3EFA03F4-7BB6-41DA-98F0-53679F8E6F9D@eclimb.net> <997211AB-452D-4042-8AF0-C8343341DDA8@eclimb.net> <99B039D3-202E-44C5-891D-F5B47B6A5E98@west.net> <2BC19BE5-F3E1-4FAF-9669-27459A8A03BC@west.net> <20080125234216.GA1507@Macintosh-2.local> Message-ID: <6FC65B24-66E5-4288-87AA-FE5AE4DBD87D@eclimb.net> Yes. Try to transferring a file via rsync from a Firewire / USB drive or a internal drive (other than your OS drive) to a network drive or another Firewire / USB drive. I tried it on a MacPro and a MacBook, both machines gave me the same results. However, if you rysnc a file from your OS drive or your Desktop, it works fine -- files appear and so forth. I have a hunch Time Machine had something to do with this. Who knows... _______________________ Craig Hoffman iChat / AIM: m0untaind0g _______________________ On Jan 25, 2008, at 4:42 PM, Eugene wrote: > On Thu, Jan 24, 2008 at 09:45:45PM CST, Craig Hoffman > wrote: >> >> Follow up -- Well, I could not figure out why rsync was producing >> invisible >> / hidden files when being transfered from an internal drive (other >> than OS >> drive) to a network drive. I even tried downloading arRsync, a GUI >> rsync >> app. Even with that, it was producing invisible files. I have a >> feeling >> Time Machine is some how interfering with the network transfer. >> The work >> around solution was to download Deja Vu, a backup app. It allows >> me to >> backup to a network drive, set a schedule and so forth. This will >> work >> for the mean time... > > Freaky. Have you tried reducing this down to a single isolated > example > that can be reproduced? Definitely sounds like a valid bug. > > > > > -- > Eugene > http://www.coxar.pwp.blueyonder.co.uk/ > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix From ecrist at secure-computing.net Sat Jan 26 08:14:21 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Sat Jan 26 08:15:44 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: <0884882E-965B-4486-B877-CB4D21513EA1@myrealbox.com> References: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> <611357B5-6062-455A-9F08-F314CD3C432D@secure-computing.net> <0884882E-965B-4486-B877-CB4D21513EA1@myrealbox.com> Message-ID: <1E056495-3E03-40D5-85FA-F7A624A268A9@secure-computing.net> On Jan 26, 2008, at 3:49 AM, Stroller wrote: > > On 25 Jan 2008, at 23:05, Eric F Crist wrote: >> On Jan 25, 2008, at 4:13 PM, Stroller wrote: >>> On 25 Jan 2008, at 15:18, TjL wrote: >>>> >>>> However, what I would really like to do is have it pop up some >>>> kind of >>>> alert window on my Mac with some kind of sound which keeps >>>> repeating >>>> until I acknowledge the window. >>> >>> Set a rule in Mail.app, so that if "From:" equals "My Notify >>> Script " then play sound "klaxxon". >> >> That only works if Mail.app happens to be running. If Mail.app >> isn't running, messages aren't being received, and filters aren't >> being processed. > > Yeah, well, the script only runs if the computer is switched on, and > other notifications are only useful if the computer has monitor &/or > speakers connected to it, &/or someone is logged into the machine. > > I assumed that the script was written in Bash, piping curl to grep > to sendmail - it may be blinkered of me, but I find this the most > "obvious" way to solve that part of the problem already described by > TjL - and I would find it clumsy to mix shell script & AppleScript. > Here any script that is run by a schedule is run on the headless > server in the cupboard under the stairs - I'm sure that'll be > switched on at any time, which I can't say of any given desktop > machine. > > Besides, if I'm at a computer then my mail is open. For me - your > milage may vary - it's just the most logical way to be notified of > stuff that's going on. > > Finally - I considered writing this in my original response - no > language which we discuss here is the best one for the task. The > easiest programming syntax is "hey, kid! make sure you check this > webpage every day - it tells you if you get a day off school." Wow, condescending much? In my opinion, it's improper to expect that a certain application already be running for a notification such as this. Like you, my mail application is often opened when I'm using my computer, but often is not always. However, your commentary got me thinking. I know that the schools and/ or news channels here in Minnesota have the option of signing up for alerts. I simply had to register my email address and when our school closes, I get an email notification. In addition to that, my blackberry has its own email address, to which I use only for special alerts and notifications. It may be most beneficial to simply set up some sort of SMS alert. Most major cellular providers in the US have a way in which you can send an email to a cell phone. ----- Eric F Crist Secure Computing Networks From luomat at gmail.com Sat Jan 26 12:55:32 2008 From: luomat at gmail.com (TjL) Date: Sat Jan 26 12:55:48 2008 Subject: [X-Unix] Sending mail from the commandline? In-Reply-To: References: Message-ID: On 1/26/08, David Ledger wrote: > At 09:52 +0000 26/1/08, Stroller wrote: > >On 26 Jan 2008, at 02:00, Kevin Stevens wrote: > >> Yes, actually, it was. However, I misread your command as > >>IMail-something and assumed you were running a different > >>application and weren't aware of mail. > > > >TjL: please note that this is an entirely logical assumption to come > >to, considering your capitalisation of the command `Mail`. > > At least one mainstream Unix has, or had, a 'Mail' which is/was an > enhanced version of 'mail' in the same way that 'mailx' is. All of the ones that I've been involved with, going back to NeXTSTEP. Checking shell accounts I have on Linux (Debian) and FreeBSD, there's a /usr/bin/Mail command, which is where you'll find it on Leopard. > Of course, with a case insensitive filesystem that's no help. Aye, there's the rub. Sorry for the confusion. TjL From luomat at gmail.com Sat Jan 26 13:29:08 2008 From: luomat at gmail.com (TjL) Date: Sat Jan 26 13:29:27 2008 Subject: [X-Unix] Calling Applescript alarm from script In-Reply-To: <0884882E-965B-4486-B877-CB4D21513EA1@myrealbox.com> References: <28B4734E-A725-4FE4-A1AB-969F9BC9DA14@myrealbox.com> <611357B5-6062-455A-9F08-F314CD3C432D@secure-computing.net> <0884882E-965B-4486-B877-CB4D21513EA1@myrealbox.com> Message-ID: On 1/26/08, Stroller wrote: > > On 25 Jan 2008, at 23:05, Eric F Crist wrote: > > On Jan 25, 2008, at 4:13 PM, Stroller wrote: > >> On 25 Jan 2008, at 15:18, TjL wrote: > >>> > > That only works if Mail.app happens to be running. If Mail.app > > isn't running, messages aren't being received, and filters aren't > > being processed. > > Yeah, well, the script only runs if the computer is switched on, and > other notifications are only useful if the computer has monitor &/or > speakers connected to it, &/or someone is logged into the machine. The computer is on 24/7, with the monitor set to turn off after 5 minutes of inactivity. > I assumed that the script was written in Bash, piping curl to grep to > sendmail - it may be blinkered of me, but I find this the most > "obvious" way to solve that part of the problem already described by > TjL - and I would find it clumsy to mix shell script & AppleScript. > Here any script that is run by a schedule is run on the headless > server in the cupboard under the stairs - I'm sure that'll be > switched on at any time, which I can't say of any given desktop machine. That's the way the script is written (well, lynx instead of curl). Clumsy? Sure, but better than showing up at the school on a cold morning to find out they've announced a delay due to "cold" (I'm from Massachusetts... they don't cancel school for "cold" and maybe not even for snow). > Finally - I considered writing this in my original response - no > language which we discuss here is the best one for the task. The > easiest programming syntax is "hey, kid! make sure you check this > webpage every day - it tells you if you get a day off school." The kid is 5, and if he wakes up to check a webpage he can't read, he's going to be up for the day. If the computer can wake me up in time for me to turn off his alarm, I can get back to sleep no problem. Oh, and Eric Crist suggested signing up with the schools. Trust me, if they had such a program, I'd be happy to sign up. They city school system doesn't even list closings on their website. Honestly the best solution might be to call the city school administration and offer to maintain the school closing page and have them call me when it needs to be updated. TjL From nickscalise at cox.net Thu Jan 31 13:32:54 2008 From: nickscalise at cox.net (Nick Scalise) Date: Thu Jan 31 13:33:03 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace Message-ID: <20080131163254.LBU5U.180317.root@eastrmwml28> Hello, I posted to this list long ago about some help with grep and I am coming back to the well one more time as the help was excellent last time. I have some report files that need to be updated and the second line needs to be changed to be similar to the first line: ServerName=Cobra LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log LogFileUsername= LogFilePassword= ServerName2=Corvette LogFilePath2=file:///d:\Webtrendslogs\corvette\e0182201\W3SVC1823\*.log What I am looking for is the line that begins with LogFilePath2 to be made to be similar to the line that begins with LogFilePath. In the example above the only differences is the machine name (cobra/corvette and the w3svc182x) I want the w3svc182x number to change but not the machine name. I will be using BBEdit for this (version 8.7.2 (260)) Can anyone provide assistance for me? TIA -- Nick Scalise nickscalise@cox.net From ecrist at secure-computing.net Thu Jan 31 14:51:30 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Jan 31 14:52:19 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace In-Reply-To: <20080131163254.LBU5U.180317.root@eastrmwml28> References: <20080131163254.LBU5U.180317.root@eastrmwml28> Message-ID: <1DA30310-5203-4EE6-99CE-6C5D555F9A50@secure-computing.net> you can do this really easily with a short command in sed, provided this text only appears in this one place. sed -i ".bak" s/W3SVC1823/W3SVC1822/g This will replace all instances for the first argument with the second argument. can contain wild cards, etc. If you need something more specific, just add text in both arguments to make it unique. sed -i ".bak" s%ogFilePath2=file:///d:\Webtrendslogs\corvette \e0182201\W3SVC1823\*.log%ogFilePath2=file:///d:\Webtrendslogs\corvette \e0182201\W3SVC1822\*.log%g You'll note that I've changed the delimiter to a % instead of the /, as I'm using the forward and backward slashes in the matched text. HTH Eric On Jan 31, 2008, at 3:32 PM, Nick Scalise wrote: > Hello, > > I posted to this list long ago about some help with grep and I am > coming back to the well one more time as the help was excellent last > time. > > I have some report files that need to be updated and the second line > needs to be changed to be similar to the first line: > > ServerName=Cobra > LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log > LogFileUsername= > LogFilePassword= > ServerName2=Corvette > LogFilePath2=file:///d:\Webtrendslogs\corvette > \e0182201\W3SVC1823\*.log > > What I am looking for is the line that begins with LogFilePath2 to > be made to be similar to the line that begins with LogFilePath. In > the example above the only differences is the machine name (cobra/ > corvette and the w3svc182x) > > I want the w3svc182x number to change but not the machine name. > > I will be using BBEdit for this (version 8.7.2 (260)) > > Can anyone provide assistance for me? > > TIA > -- > Nick Scalise > nickscalise@cox.net > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix ----- Eric F Crist Secure Computing Networks From ecrist at secure-computing.net Thu Jan 31 15:23:48 2008 From: ecrist at secure-computing.net (Eric F Crist) Date: Thu Jan 31 15:23:57 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace In-Reply-To: <1DA30310-5203-4EE6-99CE-6C5D555F9A50@secure-computing.net> References: <20080131163254.LBU5U.180317.root@eastrmwml28> <1DA30310-5203-4EE6-99CE-6C5D555F9A50@secure-computing.net> Message-ID: I forgot to mention, the sed example will create a backup of the files it's editing as .bak HTH On Jan 31, 2008, at 4:51 PM, Eric F Crist wrote: > you can do this really easily with a short command in sed, provided > this text only appears in this one place. > > sed -i ".bak" s/W3SVC1823/W3SVC1822/g > > This will replace all instances for the first argument with the > second argument. can contain wild cards, etc. > > If you need something more specific, just add text in both arguments > to make it unique. > > sed -i ".bak" s%ogFilePath2=file:///d:\Webtrendslogs\corvette > \e0182201\W3SVC1823\*.log%ogFilePath2=file:///d:\Webtrendslogs > \corvette\e0182201\W3SVC1822\*.log%g > > You'll note that I've changed the delimiter to a % instead of the /, > as I'm using the forward and backward slashes in the matched text. > > HTH > > Eric > > > On Jan 31, 2008, at 3:32 PM, Nick Scalise wrote: > >> Hello, >> >> I posted to this list long ago about some help with grep and I am >> coming back to the well one more time as the help was excellent >> last time. >> >> I have some report files that need to be updated and the second >> line needs to be changed to be similar to the first line: >> >> ServerName=Cobra >> LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log >> LogFileUsername= >> LogFilePassword= >> ServerName2=Corvette >> LogFilePath2=file:///d:\Webtrendslogs\corvette >> \e0182201\W3SVC1823\*.log >> >> What I am looking for is the line that begins with LogFilePath2 to >> be made to be similar to the line that begins with LogFilePath. In >> the example above the only differences is the machine name (cobra/ >> corvette and the w3svc182x) >> >> I want the w3svc182x number to change but not the machine name. >> >> I will be using BBEdit for this (version 8.7.2 (260)) >> >> Can anyone provide assistance for me? >> >> TIA >> -- >> Nick Scalise >> nickscalise@cox.net >> _______________________________________________ >> X-Unix mailing list >> X-Unix@listserver.themacintoshguy.com >> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > > ----- > Eric F Crist > Secure Computing Networks > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix ----- Eric F Crist Secure Computing Networks From nickscalise at cox.net Thu Jan 31 19:42:34 2008 From: nickscalise at cox.net (Nick Scalise) Date: Thu Jan 31 19:42:46 2008 Subject: [X-Unix] Help with BBEdit Grep find and replace In-Reply-To: References: <20080131163254.LBU5U.180317.root@eastrmwml28> <1DA30310-5203-4EE6-99CE-6C5D555F9A50@secure-computing.net> Message-ID: Thanks for this help. The thing is, I have about 1300 files to change and each 'W3SVC1822' field is different. How would I modify the script below to do that? On Jan 31, 2008, at 5:23 PM, Eric F Crist wrote: > I forgot to mention, the sed example will create a backup of the > files it's editing as .bak > > HTH > > On Jan 31, 2008, at 4:51 PM, Eric F Crist wrote: > >> you can do this really easily with a short command in sed, provided >> this text only appears in this one place. >> >> sed -i ".bak" s/W3SVC1823/W3SVC1822/g >> >> This will replace all instances for the first argument with the >> second argument. can contain wild cards, etc. >> >> If you need something more specific, just add text in both >> arguments to make it unique. >> >> sed -i ".bak" s%ogFilePath2=file:///d:\Webtrendslogs\corvette >> \e0182201\W3SVC1823\*.log%ogFilePath2=file:///d:\Webtrendslogs >> \corvette\e0182201\W3SVC1822\*.log%g >> >> You'll note that I've changed the delimiter to a % instead of >> the /, as I'm using the forward and backward slashes in the matched >> text. >> >> HTH >> >> Eric >> >> >> On Jan 31, 2008, at 3:32 PM, Nick Scalise wrote: >> >>> Hello, >>> >>> I posted to this list long ago about some help with grep and I am >>> coming back to the well one more time as the help was excellent >>> last time. >>> >>> I have some report files that need to be updated and the second >>> line needs to be changed to be similar to the first line: >>> >>> ServerName=Cobra >>> LogFilePath=file:///d:\webtrendslogs\cobra\E0182201\W3SVC1822\*.log >>> LogFileUsername= >>> LogFilePassword= >>> ServerName2=Corvette >>> LogFilePath2=file:///d:\Webtrendslogs\corvette >>> \e0182201\W3SVC1823\*.log >>> >>> What I am looking for is the line that begins with LogFilePath2 to >>> be made to be similar to the line that begins with LogFilePath. In >>> the example above the only differences is the machine name (cobra/ >>> corvette and the w3svc182x) >>> >>> I want the w3svc182x number to change but not the machine name. >>> >>> I will be using BBEdit for this (version 8.7.2 (260)) >>> >>> Can anyone provide assistance for me? >>> >>> TIA >>> -- >>> Nick Scalise >>> nickscalise@cox.net >>> _______________________________________________ >>> X-Unix mailing list >>> X-Unix@listserver.themacintoshguy.com >>> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix >> >> ----- >> Eric F Crist >> Secure Computing Networks >> >> >> _______________________________________________ >> X-Unix mailing list >> X-Unix@listserver.themacintoshguy.com >> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix > > ----- > Eric F Crist > Secure Computing Networks > > > _______________________________________________ > X-Unix mailing list > X-Unix@listserver.themacintoshguy.com > http://listserver.themacintoshguy.com/mailman/listinfo/x-unix -- Nick Scalise nickscalise@cox.net