delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/26/13:03:19

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=xUS
3NfeunQvgxzvrX6hu+PdNBnaHql/4eF8pM4FxmaimZqy9L2jtPSfM1rV06L7fQ6g
Lha1SZyOFl7LdQbCaXtvwuYY62qO1aM+FQv8SwdhsE5uO4gPU7KPeQdv34o8PvNp
JK6dVIAOBANbDNrm3rBwJNcqVqewdQ3cF3Fuo0Nw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=YWVkiE9Um
YmGgcn9Ql75g9ZAXpc=; b=HSbm7PS4H9zxdinz2bQObj6xVd1/FMBFYwq0XxVTt
ODecqZg2zy+URqIWLDPQoNuAU7zGAf8E+pigFhduq/S6l2/BJ2Yn+D1Zm8KmAnac
UoEUjwKtJiZ0KZ7q09VzZTZmjkCMjnfGGMt9DB29RN5rayGqRGWETBXSegJQUxed
X4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1127
X-HELO: nihcesxway6.hub.nih.gov
X-SBRS-Extended: Low
X-IronPortListener: ces-out
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr AT ncbi DOT nlm DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Sparse files in Cygwin
Date: Wed, 26 Jul 2017 17:02:57 +0000
Message-ID: <BN3PR09MB034051C075124631B6D76ADAA5B90@BN3PR09MB0340.namprd09.prod.outlook.com>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=lavr AT ncbi DOT nlm DOT nih DOT gov;
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1;BN3PR09MB0337;7:q75eDAJfj/mwEg2vPxzhwYpjDxXlIV+ihviSBWQI1SIdLFV9QNPYRjzsSdD6eatZAjUUIKu7JlF/318Su7nkZdUbKgQ9DbDLCO8ijKo2YGvW4Wq87EEfwQZXjQPANo2uTgcdHiNRFcyDM6i9YVvt7x+CzE3/4JE+zyffwwFETNIzRT9RDGc4FhLVX1XiMUIYBS4uGuY39dcO/ggnXX+JFjopmgeVMCaQPX6LI3jRXweSFLar9QdasMKp4OumBmpTeXQ6mEUBhe6YfbdT/JD9Keh13idVrSbegreID5DGVX4uOG/Tx77POUkYF0fDBjOWFJ6Cvgd3VIcHU5qTXctK3AwwaxRy9klJCldgcfdZtMYFIGCxx7EWreaNk4q7Q5x+xxpNS09o/caauT09XHL8E+Q4Y3AhZBoKmz7RIG5S7sC0XZlqGueOky/YFKYF9WBxMv4nzc+KNJ/j1pM6uykYpuRWCOb4hMcg7gOM2tWCKiWlBtkLwO+7Up5BGNZz0KAgYyldY0ivu+d3gydzbe4Z/+t9wq3LvF/fVJz/lmMHb2Nkd2Dm5WrQvhqQLFOBdE/eqDmDNOo6Ar54PXDT555T7g/5BVXGCuLvh9StcIszOeT1r1eeS8wYlBEp51se4tMHy7Kq3PfX+x13WaVluv7VRPeKGTD5S5qIB/m54aYB5FimpjX/TWuE2I6zkRskbNdKtPaKRl6vYbnJqvUQpw13HE7oI+R2m99MkSsMJKdQ4QIr6IXZRsKiw+EMhLPsuFEp6R4/SRLYN/uk2PMVmJ3GsoCPHbpG+4MUDbs8EFICDuk=
x-ms-office365-filtering-correlation-id: 69704dfe-2560-4023-64cd-08d4d44829dd
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN3PR09MB0337;
x-ms-traffictypediagnostic: BN3PR09MB0337:
x-exchange-antispam-report-test: UriScan:;
x-microsoft-antispam-prvs: <BN3PR09MB03372E43FA20E85ACC81BD4EA5B90 AT BN3PR09MB0337 DOT namprd09 DOT prod DOT outlook DOT com>
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR09MB0337;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR09MB0337;
x-forefront-prvs: 038002787A
x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(199003)(189002)(53936002)(6116002)(68736007)(9686003)(81166006)(3660700001)(81156014)(1730700003)(2351001)(99286003)(2900100001)(2906002)(8676002)(6436002)(25786009)(5640700003)(2501003)(14454004)(7736002)(8936002)(74316002)(305945005)(106356001)(3480700004)(42882006)(6916009)(189998001)(6506006)(110136004)(38730400002)(33656002)(86362001)(77096006)(101416001)(5660300001)(97736004)(478600001)(102836003)(3846002)(55016002)(105586002)(3280700002)(7696004)(54356999)(66066001)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR09MB0337;H:BN3PR09MB0340.namprd09.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2017 17:02:57.0566 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 14b77578-9773-42d5-8507-251ca2dc2b06
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR09MB0337
X-OriginatorOrg: ncbi.nlm.nih.gov
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v6QH3HVY005782

Hello,

I have a question whether sparse files are supported in Cygwin.  From the source code,
it looks like they are, but from the series of the following commands, I can't confirm:

$ dd bs=1 seek=1G if=/dev/null of=sparse
0+0 records in
0+0 records out
0 bytes copied, 0.00392699 s, 0.0 kB/s

$ ls -l sparse
-rw-r--r-- 1 lavr Domain Users 1073741824 Jul 26 12:51 sparse

$ du --apparent-size sparse
1048576 sparse

$ du sparse
1048576 sparse

Same result if I create "sparse" with "touch sparse ; truncate -s 1G sparse"


Compare Linux output:

$ touch sparse ; truncate -s 1G sparse

$ ls -l sparse
-rw-r--r-- 1 lavr cppcore 1073741824 Jul 26 12:54 sparse

$ du sparse
0       sparse

$ du --apparent-size sparse
1048576 sparse


And for those who say not all UN*X is Linux, the output from FreeBSD:

> dd bs=1 seek=1G if=/dev/null of=sparse
0+0 records in
0+0 records out
0 bytes transferred in 0.000011 secs (0 bytes/sec)

> ls -l sparse
-rw-r--r--  1 coremake  cppcore  1073741824 Jul 26 12:57 sparse

> du sparse
1       sparse

> du -A sparse
1048576 sparse


Thank you,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


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


- Raw text -


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