[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dd] conv=sparse option
From: |
Samuel Thibault |
Subject: |
[dd] conv=sparse option |
Date: |
Sat, 29 Dec 2007 22:41:50 +0000 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Hello,
Some time ago, I wrote a conv=sparse option for dd, attached is the
patch. The goal is to recreate a sparse file from a file with 0s.
Typically, I use it to do this:
# mount /dev/hda6 /mnt/mnt
# dd bs=1M < /dev/zero > /mnt/mnt/foo
# rm -f /mnt/mnt/foo
# umount /mnt/mnt
# dd bs=1M conv=sparse < /dev/hda6 > /mnt/savhda6
Which creates a sparse file out of my not-so-filled partition. Of
course, there may be other uses: re-sparsing a qemu image before tarring
it for public download, etc.
Maybe it could be useful to apply it mainstream?
Samuel
patch-dd-sparse
Description: Text document
- [dd] conv=sparse option,
Samuel Thibault <=