Don,

The functionality you need is "/dev/null". 

Indeed, the function of /dev/zero is to provide a
file which you can read indefinitely. You should use
it like this :

dd if=/dev/zero of=<whatever> bs=1024 count=number_of_blocks

Regards,

Jurgen










Don Sharp <[EMAIL PROTECTED]>
Sent by: 
[EMAIL PROTECTED]
09/25/2003 11:25 AM

 
        To:     gnuwin32 <[EMAIL PROTECTED]>
        cc:     (bcc: Jurgen Defurne/BRG/CE/PHILIPS)
        Subject:        cp /dev/zero filename creates large files
        Classification: 



Hi

I carried out the following sequence of commands

$ for i in `cat /tmp/d`; do if [ -f $i.idx ]; then ls -l ${i}*; fi; done
-rw-r--r--    1 don      None            0 Jun 17  1998 dtaq
-rw-r--r--    1 don      None         3072 Jun 17  1998 dtaq.idx
$ cp /dev/zero dtaq.idx

The cp appeared to be hanging and the disc was rattling away, so in
another window I typed in

$ ls -l dtaq*
-rw-r--r--    1 don      None            0 Jun 17  1998 dtaq
-rw-r--r--    1 don      None     65307648 Jun 17  1998 dtaq.idx

and you can see that the reported size of the target of the 'cp
/dev/zero' has grown to a considerable size in a short time.

Can anyone else reproduce this?

Attaching cygcheck.log

Cheers

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

Attachment: cygcheck.log
Description: Binary data

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

Reply via email to