Creating data of size


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Creating data of size
# 1  
Old 12-12-2006
Creating data of size

Hello,

I need to create 100kb,1000kb,10000kb etc files of no particular substance but I need them a exact size.

I think they are .dat's I need but im unsure of the command I issue to create them

Any help appreciated Smilie

Mr Pink
# 2  
Old 12-12-2006
find first 100kb file and then "man dd"
# 3  
Old 12-12-2006
You could use dd to create the 100k file by sourcing /dev/urandom
# 4  
Old 12-12-2006
try this

use mkfile. gets you exacts.

mkfile
Usage: mkfile [-nv] <size>[g|k|b|m] <name1> [<name2>] ...

ex:

mkfile 1024m testfile

exact.

-S
# 5  
Old 12-12-2006
Bug

Hi:
There's a little known device called /dev/zero which can quickly create a file of known size. This command:

dd if=/dev/zero of=myfile bs=1024 count=10

creates file "myfile" filled with zeros with a block size of 1000 muliplied 10 tens or 10K.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Creating data delimited by ASCII code 1

<Any suggestion how to create a file where the values are separated by ASCII code 1,with data extracted from a table using shell script The format is :/> <columnname1(binary1)columnvalue(binary1)columnname2(binary1)columnvalue(binary1)columnname3(binary1)columnvalue... 1st row/>... (6 Replies)
Discussion started by: dasun
6 Replies

2. UNIX for Dummies Questions & Answers

Creating a blank string of a specified size

I want to have a string which has n blank spaces For example set N = 3 create str = " " So the length depends on the value of N. I am in tcsh. (4 Replies)
Discussion started by: kristinu
4 Replies

3. UNIX for Dummies Questions & Answers

Creating directory with specific size?

Hello world, I just learnt we can create a directory with custom size in a Linux server (say Redhat). Is it true? I'm asking because the only data (I can think of) a directory's inode holds is the files and 'sub-dir's. How can a new empty directory be of some required size? :wall: PS : In... (2 Replies)
Discussion started by: satish51392111
2 Replies

4. UNIX for Dummies Questions & Answers

creating a new variable from existing data

Hello, I have the following data set: TRAIT DOSE 40 0.4 30 0.3 95 1.2 120 1.7 85 1.4 136 1.8 134 1.8 40 0.4 30 0.3 95 1.2 120 1.7 85 1.4 136 1.8 134 1.8 40 0.4 30 0.3 95 1.2 (2 Replies)
Discussion started by: wolf_blue
2 Replies

5. Shell Programming and Scripting

Creating trash data?

How could I go about creating some trash files to use for testing. All I need is for files to exist and the data in them really doesn't matter. I need to do some work and testing with scripts and I don't want to mess with real data in my testing. So I would like to generate say 10,000 files... (10 Replies)
Discussion started by: MrEddy
10 Replies

6. UNIX for Advanced & Expert Users

creating data loading script

asdfasdfasdfasdf??? (2 Replies)
Discussion started by: noorm
2 Replies

7. Shell Programming and Scripting

Creating large number of files of specific size

Hi I am new to shell scripting.I want to create a batch file which creates a desired number of files with a specific size say 1MB each to consume space.How can i go about it using for loop /any other loop condition using shell script? Thanks (3 Replies)
Discussion started by: swatideswal
3 Replies

8. Filesystems, Disks and Memory

Creating filesystem of 2MB size

Hi all, I would like to ask on how to create 2MB partition on a Compact Flash card. It supposed to be of FAT12 type, and the CF capacity is 4GB. I try to do the partitioning and specify the size as 2MB but the partition editor automatically resize it to 8MB. I know that this is possible and the... (4 Replies)
Discussion started by: archayl
4 Replies

9. Solaris

How to correctly allocate size while creating FileSystem

Hello - I am finding difficulty in creating and allocating correct size to File Systems on solarix x86 box. Please see below contents I followed on screen and in the end It shows that /app file system is created of size 135GB , I wanted it to be 30gb as mentioned during 'format' command in 'Enter... (7 Replies)
Discussion started by: panchpan
7 Replies
Login or Register to Ask a Question