How to copy a sparse file?

Solution Verified - Updated -

Issue

  • When I copy a sparse file using cp command, the destination file gets changed to a fully allocated file. How do I copy a sparse file by keeping the destination copy as a sparse file?
  • How to copy a XEN or KVM Virtual Machine image if it was created as a sparse file?

Environment

  • Red Hat Enterprise Linux 5, 6, 7, 8, 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content