Zach Burlingame
Programming, Computers, and Other Notes on Technology

HOWTO: Using cpio to Copy a Partition in Linux

Using cpio to copy everything from one partition to another in Linux, maintaining all file permissions, symlinks, and timestamps.

# File: copy_partition.notes
# Auth: burly
# Date: 03/20/05
# Desc: A method of copying everything from one 
#      partition to another

# Change directories to the top level of the 
# partition you want to copy
cd /part

# Use find to locate all objects and cpio to copy them
find . -mount -print0 | cpio -0dump /path/to/new/part

One Response to “HOWTO: Using cpio to Copy a Partition in Linux”

  • Raid Systeme und Raid Controller…

    […]HOWTO: Using cpio to Copy a Partition in Linux | Zach Burlingame[…]…

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *