Moving home folder to SSD: How ensure all files, folders and settings are copied?

Posted on


I am going to move my home folder on El Capitan to a separate SSD. I am familiar with the process and have done this before.

I would like to have the contents of the home folder – that is, all its subfolders such as Desktop – immediately “under” the SSD; thus SSD/desktop.

If I click the home folder, copy it and paste into the SSD, the result will be that the home folder itself will be included in the path; thus SSD/username/desktop.

My question is what I should do to copy only the contents of the home folder without including its “top” folder.

If I instead open the home folder, select all folder and then paste I believe I won’t include all hidden files and folders, which I assume I need.

I know I can show hidden files and folders using Terminal. But if I, having done that, select all, copy and paste I am not sure all folder settings etc are included.


Click System Preferences then Users &Groups. Control+click on the user whose Home folder you want to modify, and select Advanced Options. About halfway down the page you will see the option to specify the Home directory.

Afterwards, use the terminal to copy your files to the new directory. I would use cp to copy so you can verify that everything moved properly before deleting the old location (example: cp -R oldhomeDirectory newhomeDirectory) (I don’t remember if the -R trigger is necessary on Mac…).

Finally, right click the parent directory of both Home locations, and show folder info to verify the same exact sizes.

I just copied my home folder to a separate partition and it seems to work fine.

Everything was done using a temporary admin account to make sure I wasn’t writing to my home folder while copying it, and to make sure I wouldn’t be locked out if something went wrong after setting it as the new home folder in system settings.

I used cp -a /Users/myname /Volumes/MyVolume/Users/myname. In this specific case you would probably want to use

cp -a /Users/myname/ /Volumes/MyVolume

The trailing / after the source path results in copying its contents but not the directory itself, when combined with the -a option.

The -a option corresponds to the -pPR options:

 -a    Same as -pPR options. Preserves structure and attributes of files but not
       directory structure.

 -P    If the -R option is specified, no symbolic links are followed.  This is the

 -p    Cause cp to preserve the following attributes of each source file in the copy:
       modification time, access time, file flags, file mode, user ID, and group ID,
       as allowed by permissions.  Access Control Lists (ACLs) and Extended Attributes
       (EAs), including resource forks, will also be preserved.

       If the user ID and group ID cannot be preserved, no error message is displayed
       and the exit value is not altered.

       If the source file has its set-user-ID bit on and the user ID cannot be pre-
       served, the set-user-ID bit is not preserved in the copy's permissions.  If the
       source file has its set-group-ID bit on and the group ID cannot be preserved,
       the set-group-ID bit is not preserved in the copy's permissions.  If the source
       file has both its set-user-ID and set-group-ID bits on, and either the user ID
       or group ID cannot be preserved, neither the set-user-ID nor set-group-ID bits
       are preserved in the copy's permissions.

 -R    If source_file designates a directory, cp copies the directory and the entire
       subtree connected at that point.  If the source_file ends in a /, the contents
       of the directory are copied rather than the directory itself.  This option also
       causes symbolic links to be copied, rather than indirected through, and for cp
       to create special files rather than copying them as normal files.  Created
       directories have the same mode as the corresponding source directory, unmodi-
       fied by the process' umask.

       In -R mode, cp will continue copying even if errors are detected.

       Note that cp copies hard-linked files as separate files.  If you need to pre-
       serve hard links, consider using tar(1), cpio(1), or pax(1) instead.

Actually, I accidentally left a trailing / after my source folder which is how I know it will definitely include all hidden files as well as exclude the topmost directory.

Leave a Reply

Your email address will not be published. Required fields are marked *