LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-14-2006, 06:46 PM   #1
crofty13
LQ Newbie
 
Registered: Feb 2005
Location: Thailand
Posts: 28

Rep: Reputation: 15
Moving data between Partitions


I have two partitions:

location mount point
/dev/hda1 /
/dev/hda2 /home

how can I move the /home and all of its contents across to /dev/hda1 so I can unmount hda2 and reformat it?
 
Old 07-14-2006, 06:54 PM   #2
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
just mount /dev/hda2 and copy all data to a temporary position in /dev/hda1. Then once you have formatted /dev/hda2 (i suppose you'd be using fdisk for that), you can move the files back into hda2.

For instance, you can create a directory /temporary and move all files from /home there, if you have enough space to copy all of /home
 
Old 07-14-2006, 07:10 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,427

Rep: Reputation: 51
Use rsync.

-twantrd
 
Old 07-14-2006, 08:43 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 121Reputation: 121
I second the rsync advice.

"rsync -vaz /home /"
This command does the same: "rsync -vaz /home/* /home/"
Notice where I add slashes and extra directories and the *
Be sure to test-run all of this by running the command first with an additional parameter: "-n"
Which gives a lot of output, but that is all informational - i.e. it tells you what it WOULD
do if you run the command without the "-n" parameter.

Peace,
Bruce
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
moving partitions toaster.waffle Linux - General 5 06-09-2005 12:15 AM
Moving Partitions. firedance Linux - General 1 01-08-2005 04:07 AM
copying/moving stalls when moving a lot of data to a usb stick =X¥®µ§= Linux - Hardware 10 07-30-2004 05:29 AM
moving partitions around Rocker Linux - General 7 02-02-2004 11:21 AM
Moving partitions nabil Linux - Software 5 07-17-2001 03:55 AM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration