[vox-tech] Utility to image a hard drive

Rick Moen rick at linuxmafia.com
Thu Apr 9 14:43:01 PDT 2009


Quoting chris (teknopup at gmail.com):

> cp -r $1/* $2 
> 
> :)

Major win for simplicity!  But consider "cp -ax [foo] [bar]".

The "a" accomplishes everything "r" does, while avoiding dereferencing
symlinks, and preserving ownership, permissions, and time stamps.  The
"x" avoids accidentally crossing filesystem boundaries, which can be 
A Very Bad Thing, if, say, copying the root FS.  (Trying to copy
/proc/kcore will ruin your whole day.)


More information about the vox-tech mailing list