bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: cp command - problem with sparse


From: RE
Subject: AW: cp command - problem with sparse
Date: Wed, 2 Feb 2005 11:11:38 +0100

Hi Eric,

Thanks a lot for your mail.  I just tried to send a mail to Corinna who
answered you in the list but I am afraid that I am black-listed with her
account and I don't know how to solve the problem.  I already tried to get
white-listed by sending a mail to
address@hidden , but it
didn't work for me.

Maybe you can answer my question or help me with my "sparse problem" which I
am quoting in the following once again.  [BTW I don't know if the patch you
sent me will be needed, but if yes, I would not know how to apply it ;-((( ]


Well, I am not a programmer but I am looking for a solution for the
following.  And I still 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?

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

Your help and assistance would be appreciated very
much.

Thanks and regards,


Rolf


-----Ursprüngliche Nachricht-----
Von: Eric Blake [mailto:address@hidden
Gesendet: Mittwoch, 2. Februar 2005 04:17
An: James Youngman
Cc: RE; address@hidden
Betreff: Re: cp command - problem with sparse


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 2/1/2005 3:17 AM:
>
> Unix systems automatically generate sparse files when programs seek
> forwards on their output file.  There is no need to have a "sparse"
> attribute.  This is what coreutils' "cp" does.
>
> Windows and NTFS don't work in this way.  Under NTFS, there is, as you
> say, a "sparse" attribute which must be set.  GNU coreutils runs on
> Windows under Cygwin and am not sure if Cygwin exposes any form of API
> which might allow cp to set the sparse attribute.  It's certainly a lot
more complex to do this under Windows.
>

According to the cygwin mailing list,
http://sources.redhat.com/ml/cygwin/2005-02/msg00013.html, cygwin already
supports sparse files when you do lseek beyond EOF during writes.  The
trick, however, is that NTFS on Windows XP does not create a hole until
128k.

Therefore, this patch is needed in the testsuite to turn a SKIP into a
PASS on cygwin:

2005-02-01  Eric Blake  <address@hidden>  (tiny change)

        * tests/du/8gb: Detect sparse files on NTFS under cygwin.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCAEZA84KuGfSFAYARAiFSAKDF7lb6zJq6ADLsFyHPrgkQ30tDaACcDT7P
8lGA+YY7czPjlGfVQYRANaQ=
=E+76
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]