From: Simon Valiquette <v.simon@ieee.org>
To: linux-newbie@vger.kernel.org
Subject: Re: Create files with specific sizes?
Date: Fri, 17 Dec 2004 16:15:25 -0500 [thread overview]
Message-ID: <41C34C6D.2030306@ieee.org> (raw)
In-Reply-To: <cprlk8$gpo$1@sea.gmane.org>
SVisor a écrit :
>
>>> I wanted a file of garbage, not zeroes.
>>> So I tried: dd if=/dev/random of=file bs=1k count=1024
>
> Nope I did not abort it, I just moved the mouse to generate more random
> numbers (with dd running in X terminal). What dd says is:
>
> 0+1024 records in
> 0+1024 records out
>
You have read and written 1024 partial blocks (ie. not complete).
Why? I don't know.
You did'nt say if the produced file is always the same size, or
differents but always bigger (or smaller) than 4K? Please give the
exact value(s) as it can hint at what the problem is. I have the
impression that you get only 4 bytes per block readed. You can
experiment with different values to try to find a patern.
Also, check if the produced file really is random data.
Try "cp /dev/urandom /tmp/file.cp" and type CTRL-C after waiting a
couple of seconds. If it works (and get a very big file), then the
problem is not related to the random devices. I suppose here that you
had the same problem with random and urandom.
By curiosity, try this and report the exact file size produced (and
check if it is random data).
dd if=/dev/urandom of=/tmp/file.cp bs=1 count=1024x1024
> But the file still is just ~4k. Maybe a bug?
>
Maybe, but I would be surprised. I suspect that if you do a
reinstall from scratch (or use a Knoppix disk) you will not see your
problem any more. You did'nt even said which Linux distribution you are
using, so with that little information I can't help much. By the way, I
can't reproduce your problem.
Simon Valiquette
http://www.gulus.org
http://gulus.USherbrooke.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2004-12-17 21:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-14 8:52 Create files with specific sizes? Khan
2004-12-14 9:12 ` qwms-avib
2004-12-14 9:24 ` Khan
2004-12-14 9:41 ` SVisor
2004-12-14 18:54 ` Simon Valiquette
2004-12-16 9:47 ` SVisor
2004-12-17 21:15 ` Simon Valiquette [this message]
2004-12-18 11:05 ` SVisor
2004-12-14 19:20 ` qwms-avib
2004-12-16 1:14 ` Eric Bambach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41C34C6D.2030306@ieee.org \
--to=v.simon@ieee.org \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox