{"id":139,"date":"2006-03-14T21:58:21","date_gmt":"2006-03-15T01:58:21","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=139"},"modified":"2014-03-07T12:33:27","modified_gmt":"2014-03-07T16:33:27","slug":"moving-a-directory-from-one-apple-mac-to-another-with-target-mode","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2006\/03\/moving-a-directory-from-one-apple-mac-to-another-with-target-mode\/","title":{"rendered":"Moving a Directory from one Apple Mac to another with Target Mode"},"content":{"rendered":"<p>As we all get MacBook pro systems, we need to move out home directories back and forth.  Here are my Chuck crib notes for the process.<\/p>\n<p>This is my process when I switch mac&#8217;s.  Boot the old mac in target mode.<\/p>\n<p>Boot the new mac normally.  Lets assume the account is &#8216;csev&#8217;.<\/p>\n<p>Make a new account other than csev.  Make this account an administrator.<\/p>\n<p>Make a new csev account.  Make the account an administrator.<\/p>\n<p>Logout and login as csev.  Once csev has logged in once log out and then log in on the other administrator account.<\/p>\n<p>Start a terminal program .<\/p>\n<p>$ sudo sh<br \/>\nType your password for the non-csev account<\/p>\n<p># cd \/Users<br \/>\n# mv csev csev.old<\/p>\n<p>Plug in the target computer &#8211; It should appear as a disk.<\/p>\n<p># ls -l \/Volumes<\/p>\n<p>Make sure that you know the right volume that corresponds to your old disk &#8211; note that your new disk may be here too.  If they are both Macintosh HD &#8211; there will be something that makes the mount point unique.<\/p>\n<p># cd \/Volumes\/whatever\/Users<br \/>\n# ls -l<br \/>\n**** You should see csev<\/p>\n<p>Now comes the nifty bit.<\/p>\n<p># tar cf &#8211; csev | ( cd \/Users ; tar xfv &#8211; )<\/p>\n<p>What this does is tar (no compression) up the directory from the target drive &#8211; send the output through a UNIX pipe, and then untar the files in the \/Users directory in the new system.<\/p>\n<p>Output will stream by.  If you want to see the errors, remove the &#8216;v&#8217; from the second tar.  Don&#8217;t compress &#8211; (z option) it is a massive waste of time and CPU.<\/p>\n<p>Once the tar completes, do the folllowing<\/p>\n<p># cd \/Users<br \/>\n# chown -R csev.csev csev<br \/>\nThis recursively sets the ownership of the files to the new account.  Chown will complain about the -R option &#8211; ignore that.<\/p>\n<p><b>Update 2009:<\/b> They changed the syntax of the chown command in Mac OS\/X 10.5 and later:<\/p>\n<p># chown -R csev:staff csev<\/p>\n<p>When complete &#8211; close the terminal window, log out and then log in to the csev account.<\/p>\n<p>Viola!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we all get MacBook pro systems, we need to move out home directories back and forth. Here are my Chuck crib notes for the process. This is my process when I switch mac&#8217;s. Boot the old mac in target mode. Boot the new mac normally. Lets assume the account is &#8216;csev&#8217;. Make a new [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":4,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":4325,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/139\/revisions\/4325"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}