Re: [PATCH] adding two new options to 'cp'

[ Available lists | Index of freebsd-hackers | Month of Aug 2006 | Week of 2 Aug 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Tim Kientzle <kientzle@freebsd.org>
Date
2 Aug 2006 06:35:11
Subject
Re: [PATCH] adding two new options to 'cp'
Message-ID
44D04797.1040201@freebsd.org

In reply to
Replies

[ Hide this part ]
Rick C. Petty wrote:
>
> While we're at it, I think we should add the -S option to bsdtar. I'm
> willing to do the work ...

I have pretty strong ideas about sparse file support
for bsdtar.

The "cheap" solution is to handle it purely on
extract: Detect blocks of zeros when restoring
files and seek over them. That would be
pretty easy to implement: just add another
option to archive_read_extract() and implement
the logic to skip over blocks of zeros.

Archiving sparse files as such is harder, although
I do have an outline of a technique which would
not only handle sparse files, but also allow archiving
files whose size is not known in advance (something the
GNU tar approach doesn't support). I simply dislike
the GNU tar approach, in part because it requires
two passes over the file (the map of holes is required
before the file is written).

Again, if someone is really interested, let me know.

Tim Kientzle


Elapsed time: 0.143 seconds