On Mon, Jan 31, 2005 at 05:30:22PM +0100, RE wrote: > "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 an 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)
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. See http://www.ntfs.com/ntfs-sparse.htm and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/fsctl_set_zero_data.asp _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
