Swapping Drives...
Steven Elling
ellings at kcnet.com
Mon Jul 21 22:44:22 CDT 2003
On Monday 21 July 2003 16:50, Duane Attaway wrote:
> On Mon, 21 Jul 2003, Steven Elling wrote:
> > cp -a /home/* /home/me/temp
> > or
> > cp -dpR /home/* /home/me/temp
> >
> > I just tested the recursive copy and it will do this. So, don't mount
> > the directory you want to copy to underneath the location your are
> > copying from.
>
> I believe cp's -x option should do the trick quite nicely:
>
> -x, --one-file-system
>
> Skip subdirectories that are on different filesystems from
> the one that the copy started on.
Yea, I know the '-x' option exists. I just didn't mention it because I
think mounting drives in this manner for this reason is not the best way to
do it.
If I do it this way, human nature will always step in when I least need it
and I'll forget the '-x' option.
More information about the Kclug
mailing list