Skip to content

Instantly share code, notes, and snippets.

@davorb
Created October 17, 2011 16:19
Show Gist options
  • Save davorb/1292989 to your computer and use it in GitHub Desktop.
Save davorb/1292989 to your computer and use it in GitHub Desktop.
Copy files when moving dir
#http://embraceubuntu.com/2006/01/29/move-home-to-its-own-partition/
#Now, Copy files over:
#Since the “/home” directory will have hardlinks, softlinks, files and nested directories, a regular copy (cp) may not do the job completely. Therefore, we use something #we learn from the Debian archiving guide:
cd /home/
find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment