[Techtalk] Day 3, no Windows
hobbit at aloss.ukuu.org.uk
hobbit at aloss.ukuu.org.uk
Fri Aug 16 10:12:25 EST 2002
On Fri, Aug 16, 2002 at 09:53:30AM +1000 or thereabouts, Carlo Hamalainen wrote:
> I also recommend the rsync program that somebody mentioned on this list a
> few days ago. I've just discovered it myself (had always thought it was a
> program for maintaining big FTP sites). I didn't know it was a one-liner!
Yeah, I always thought it was for large jobs too.
> With rsync, I can keep a directory perfectly up-to-date. To upload files
> from home or office to server, I use:
>
> rsync -avz -e ssh work server:
>
> And to pull the latest directory down, I do
>
> rsync -avz -e ssh server:work .
Heh. Barring the order of the options, I have exactly the same.
Which I put into a one-line file I made executable in the directory
I'm always running it from, so that I do "./rs[tab][return]" and
kick it off in six characters :)
(rsync --help)
-e, --rsh=COMMAND specify rsh replacement
-v, --verbose increase verbosity
-z, --compress compress file data
-a, --archive archive mode
> So easy! I should also add a --delete option, to remove old files that
> disappear from the latest copy.
Did you see the handy thing in the man page for that? Under --delete
it says,
This option can be dangerous if used incorrectly!
It is a very good idea to run first using the dry
run option (-n) to see what files would be deleted
to make sure important files aren't listed.
I love this kind of "what would happen if..?" option.
o rsync and gnupg both have --dry-run/-n.
o rpm has a --test option (this won't do post-install script checks;
but it tells you what would happen if you de the rest. I use it a
lot to check dependencies. Roundabout way to do it, but..)
o cdrecord has a -dummy (one hyphen) option (it goes through all the
motions but with no laser)
Any more?
Telsa
More information about the Techtalk
mailing list