[Editor's note: We have published articles in the past that discussed cloning the system. This script looks to be another valid method of doing the same thing, so I felt it worthy of publishing on its own. I have not tried the script myself.]
|
|
|
Here's a shell script that clones an entire Mac OS X file structure from one location to another. Though not an original concept here on Mac OS X Hints, the script demonstrates a good assortment of shell scripting tricks that every OS X geek should get to know.
[Editor's note: We have published articles in the past that discussed cloning the system. This script looks to be another valid method of doing the same thing, so I felt it worthy of publishing on its own. I have not tried the script myself.]
•
[4,181 views]
Hint Options
Why use cp?
This script seems to assume you have the developer tools installed, so I wonder why it uses cp instead of CpMac, which comes with the DevTools, and handles resource forks....
Why use cp?
uh ignore that, I misread the script :P
GUI tool does the same thing
I've developed a tool called Carbon Copy Cloner that does the same thing, except in a GUI. I also published similar instructions (actually an entire guide to backing up OS X, including shell commands) a while ago...
Quick notes: ditto will fail if it encounters locked files, so you may want to execute "chflags -R nouchg,noschg [directory]" before using ditto. You also do not need to recreate the mach.sym link, it is recreated on every startup.
GUI tool does the same thing
I admit your cloner app works great but I noticed one thing. Some of the properties / ownership /privileges have changed. Where the original file shows owner as root and group as admin the new folder has the owner as the User and group Unknown.
Thanx Bombich!
I've added a chflags command to the script as you suggested. I might add the folder-blessing also, but I don't know it's strictly necessary. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.12 seconds |
|