From: Eric Bambach <eric@cisu.net>
To: Khan <nbv.sa@lol.ba>
Cc: linux-newbie@vger.kernel.org
Subject: Re: Create files with specific sizes?
Date: Wed, 15 Dec 2004 19:14:07 -0600 [thread overview]
Message-ID: <200412151914.07337.eric@cisu.net> (raw)
In-Reply-To: <41BEA9C4.4050700@lol.ba>
On Tuesday 14 December 2004 02:52 am, Khan wrote:
> Hello,
>
> is there any way (some command) that will allow me to create blank files
> with specific sizes, eg 1MB, 5MB, 10MB etc.
>
> TNX
Just for the sake of chipping in...dd supports the K,M,GB suffixes so you
don't have to remember odd numbers (1024,2048,3096). You can just write
dd if=/dev/urandom of=/myfile bs=1M count=1
dd if=/dev/urandom of=/myfile bs=10M count=1
dd if=/dev/urandom of=/myfile bs=5M count=1
dd if=/dev/urandom of=/myfile bs=5G count=1 ;)
Manpage for DD:
The GNU fileutils-4.0 version also allows the
following multiplicative suffixes in the specification of blocksizes
(in bs=, cbs=, ibs=, obs=): M=1048576, G=1073741824, and so on for T,
P, E, Z, Y. A `D' suffix makes them decimal: kD=1000, MD=1000000,
GD=1000000000, etc. (Note that for ls, df, du the size of M etc. is
determined by environment variables, but for dd it is fixed.)
HTH!
--
----------------------------------------
--EB
> All is fine except that I can reliably "oops" it simply by trying to read
> from /proc/apm (e.g. cat /proc/apm).
> oops output and ksymoops-2.3.4 output is attached.
> Is there anything else I can contribute?
The latitude and longtitude of the bios writers current position, and
a ballistic missile.
--Alan Cox LKML-December 08,2000
----------------------------------------
-
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
prev parent reply other threads:[~2004-12-16 1:14 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
2004-12-18 11:05 ` SVisor
2004-12-14 19:20 ` qwms-avib
2004-12-16 1:14 ` Eric Bambach [this message]
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=200412151914.07337.eric@cisu.net \
--to=eric@cisu.net \
--cc=linux-newbie@vger.kernel.org \
--cc=nbv.sa@lol.ba \
/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