delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/02/02/05:30:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Delivered-To: corinna-cygwin AT cygwin DOT com
From: "RE" <eicher_und_bergmann AT yahoo DOT de>
To: <cygwin AT cygwin DOT com>, <corinna-cygwin AT cygwin DOT com>
Subject: WG: cp command - problem with sparse [sparse file suuport under NTFS (Win2k)]
Date: Wed, 2 Feb 2005 11:29:38 +0100
Message-ID: <EGECIPGBMFENJDOHIEMIMEMMCBAA.eicher_und_bergmann@yahoo.de>
MIME-Version: 1.0


-----Ursprüngliche Nachricht-----
Von: RE [mailto:eicher_und_bergmann AT yahoo DOT de]
Gesendet: Mittwoch, 2. Februar 2005 10:40
An: corinna-cygwin AT cygwin DOT com
Cc: 41FF88C8 DOT 5060604 AT byu DOT net
Betreff: cp command - problem with sparse [sparse file suuport under
NTFS (Win2k)]


Hi Corinna,

Eric Blake send me a mail with a reference to your post
<41FF88C8 DOT 5060604 AT byu DOT net>

Attached please find your post of February 1


Well, I am not a programmer but I am looking for a solution for the
following.  And I think that cp.exe from fileutils/coreutils might do the
job.  But so far I wasn't successful.

I have files on my HD that contain large amounts of zeroes (between 4 and
100 MB of zeroes) and I want to convert them into sparse files.  I already
tried the GNU fileutils with their cp command.  They say that it converts
standard files into sparse files by using the command

"cp --sparse=always c:\test.cfg c:\test2.cfg"


Everything works fine with that cp command, except the fact that I do not
get a sparse file.  Even when I copy a sparse file, the sparse attribute is
no longer present in the copy and the occupied space on my HD is the same as
with the original file.

What am I doing wrong?  Is there a bug with cp.exe?  Is the command I am
using not correct?

I tried already different PCs with NTFS (OS = Win2k SP4)

Your help and assistance would be appreciated very
much.

Thanks and regards,


Rolf



Corinna wrote:

On Feb  1 06:48, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This question came up on the coreutils list:
>
> Does cygwin provide any support for sparse files on NTFS volumes that
> support it?  lseek() could be patched to use FSCTL_SET_ZERO_DATA when a
> seek jumps past the end of a file open for writing, but there is still the
> issue of when that file is given the FSCTL_SET_SPARSE attribute.

lseek already creates sparse files automatically in a write after lseek,
if the lseek seeked more than 128K beyond EOF.  128K is the value which
has been found to be the smallest sparse block size at which making
the file sparse makes a difference on XP.


Corinna




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019