[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Move directory from one petition/device to another



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]