Move directory from one petition/device to another
akonstam at trinity.edu
akonstam at trinity.edu
Fri Sep 16 21:10:57 UTC 2005
On Sat, Sep 17, 2005 at 08:41:06AM +1200, Cameron Beattie wrote:
> I would like to move a directory from one petition to another. For example
> /dev/sdb1 is mounted on /.
> I would like to move directory /etc to /dev/sda2.
>
> Could anyone offer advice on the easiest way to achieve this?
>
> I have had a look at dd but that seems to allow for copying files or an
> entire device, not a directory.
>
> Many thanks
>
> Cameron
Something like this should work:
Let us assume that /dev/sda2 is mounted on /sda2
cd /
tar cf - ./etc | (cd /sda2; tar xf -)
--
=======================================================================
What a strange game. The only winning move is not to play.
-- WOP, "War Games"
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
telephone: (210)-999-7484
More information about the fedora-list
mailing list