From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4da5e030e6766a04 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-11-19 08:15:39 PST Path: nntp.gmd.de!xlink.net!fauern!zib-berlin.de!prise.nz.dlr.de!news.dfn.de!swiss.ans.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!john From: john@iastate.edu (John Hascall) Newsgroups: comp.unix.osf.osf1 Subject: Re: Sparse files take up more space when copied Date: 16 Nov 1994 00:08:12 GMT Organization: Iowa State University, Ames, Iowa (USA) Message-ID: <3abihc$t0q@news.iastate.edu> References: <3aaj2f$qql@xdm084.ccc.cranfield.ac.uk> NNTP-Posting-Host: pooh.cc.iastate.edu Peter da Silva wrote: }Peter Lister wrote: }> I tarred the directory and gzip managed 94% compression on the tar }> file (yes, that's right, reduced the size by 94%), so these files are }> obviously pretty sparse. It would seem that I-DEAS can take advantage }> of some pretty good file compression in the OSF1 filesystem when it }> writes it's files, but tar,cp,etc don't manage this. }To be precise... if you seek to a point beyond the end of a file then write, }blocks between the end of the file and the new seek point will not be }allocated until they are written to, and will read as blocks of zeros. } }A database program will tend to do this, producting what's called a "sparse }file". } }If you write a block of zeros, it will be allocated, so tar and cp and so on }will populate a sparse file. } }The fix is to have a program that seeks (on output) over blocks of zeroes (on }input) as it writes. It's not a complex program... Or, just use "dd conv=sparse ..." John -- John Hascall ``An ill-chosen word is the fool's messenger.'' Systems Software Engineer, ISU Comp Center + Ames, IA 50011 + 515/294-9551 & Hascall Systems - Unix/C/Internet Consulting, Training, Custom Programming