🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #59416

Re: Help: Wnat to separate fielsystem

#59416
From: Mike Benson
Date: Wed, 07 Feb 1996 00:00
41 lines
1760 bytes
ken@syd.dit.CSIRO.AU (Ken Yap) wrote:
>|>I want to move the /usr to another partition, how can I do it?
>|>I've already prepare the partition for /usr but I don't know
>|>how to do then.
>|
>|You need to duplicate your entire /usr tree onto the new drive.
>|
>|First, amount the new drive into some convenient location, such as
>|/mnt:
>|
>|  mount -t <type> /dev/?d?? /mnt
>|
>|Then do the following to completely duplicate the directory tree:
>|
>|(cd /usr; tar cf - . ) | (cd /mnt; tar xvf -)
>|
>|The effect is to run tar twice in a pipe, the sending end creating
>|an archive into the pipe starting at /usr, and the receiver grabbing
>|data from the pipe and unpacking it into /mnt.

>That's excellent advice and I would add this:

>(cd /usr; tar cf - . ) | (cd /mnt; tar xvpf -)

>The p flag says retain original mode of the files.  Otherwise you get
>whatever mode results from the current umask.

>I've also read that cp -A (GNU cp) or something like that will also do
>the job but never tried it myself.

The normal way I do this on Sys V type systems is

$ cd /usr; find . -depth -print | cpio -pdmuv /mnt

Don't ask me if it's better than using tar. The PERL adage applies:
"There's more than one way to do it!"

Regards,

Mike.
Technical Details
Message-ID: <1244.6607T1214T2757@magna.com.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <DM3Fy6.JsM@hkuxb.hku.hk> <DM3HHx.4rv@blaze.net.au> <4eri73INN1gk@seurat.syd.dit.csiro.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,e56598697dbdb905
X-Google-Attributes: gid102983,public
From: mikb@magna.com.au (Mike Benson)
Subject: Re: Help: Wnat to separate fielsystem
Date: 1996/02/07
Message-ID: <1244.6607T1214T2757@magna.com.au>
X-Deja-AN: 138356022
references: <DM3Fy6.JsM@hkuxb.hku.hk> <DM3HHx.4rv@blaze.net.au> <4eri73INN1gk@seurat.syd.dit.csiro.au>
organization: MAGNADATA Internet Services
newsgroups: aus.computers.linux