Ho appena copiato la mia cartella home in una partizione separata e sembra funzionare bene.
Tutto è stato fatto utilizzando un account amministratore temporaneo per assicurarsi che non stavo scrivendo nella mia cartella principale durante la copia e per assicurarsi che non sarei bloccato se qualcosa andasse storto dopo averlo impostato come nuova cartella principale nelle impostazioni di sistema .
Ho usato cp -a /Users/myname /Volumes/MyVolume/Users/myname
. In questo caso specifico probabilmente vorrai utilizzarlo
cp -a /Users/myname/ /Volumes/MyVolume
Il trascinamento /
dopo il percorso di origine comporta la copia del suo contenuto ma non della directory stessa, se combinato con l' -a
opzione.
L' -a
opzione corrisponde alle -pPR
opzioni:
-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
default.
-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.
In realtà, ho lasciato accidentalmente un trailing /
dopo la mia cartella di origine, che è il modo in cui so che includerà sicuramente tutti i file nascosti, oltre a escludere la directory più in alto.