Re: [SLUG] sparse file

From: Paul M Foster (paulf@quillandmouse.com)
Date: Mon Mar 31 2008 - 12:03:26 EST


On Mon, Mar 31, 2008 at 11:44:58AM -0400, Eben King wrote:

> On Mon, 31 Mar 2008, Dylan William Hardison wrote:
>
>> Spake Eben King on Monday, March 31, 2008 at 02:05AM -0400:
>>> How would I create a sparse (no allocated storage) file? Reason: I've
>>
>> dd count=0 bs=1M seek=20 of=pants
>
> Thanks. I modified it a bit:
>
> eben@pc:~$ dd count=0 bs=1M seek=100 if=/dev/zero of=testfile
>
> Dunno what it does with the infile, but if it's not there, dd hangs.
>

dd copies from here to there. Without an input, it gets testy. The
/dev/zero generates zeroes for your file contents.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:32:35 EDT