This is the mail archive of the
mailing list for the Cygwin project.
Re: Moving Home dir to another partition
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: René Berber <r dot berber at computer dot org>
- Cc: cygwin at cygwin dot com
- Date: Wed, 8 Mar 2006 14:44:24 -0500 (EST)
- Subject: Re: Moving Home dir to another partition
- References: <firstname.lastname@example.org> <email@example.com>
- Reply-to: cygwin at cygwin dot com
On Wed, 8 Mar 2006, René Berber wrote:
> Mool wrote:
> > 1) Cygwin Installed on C:\Cygwin (C: partition win winXP SP2)
> > 2) First run created /home/$USER in C:\Cygwin
> > how to MOVE my home dir in another partition D:, so I'll use
> > D:\cygwin\home\$USER?
> cp -rp /cygdrive/c/Cygwin/home/$USER /cygdrive/d/Cygwin/home
Unless cp has changed in multiple ways, a better idiom would be
tar -C /home -cf - $USER | tar -C /cygdrive/d/Cygwin/home -xf -
which will preserve symbolic links, etc. In both cases, any extra ACLs on
the files will be lost. Also, depending on the text vs. binary mode
settings of /cygdrive and /, there might be issues with that as well.
It may be better to *move* (not copy) the directory using Windows,
> Edit /etc/passwd changing $USER's line with the new home (i.e. from
> /home/$USER to /cygdrive/d/Cygwin/home/$USER)
No reason. Just "mount -fs D:/cygwin/home/$USER /home/$USER", and you
won't have to change anything.
> _test it_, if it works then you can delete the old home directory.
> All this is assuming you haven't changed the cygdrive prefix. And if
> you do change it in the future the new $HOME will not work, you'll have
> to edit passwd again.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html