04-06-2005
yes there is. I know of a command called "prealloc". It is used to create a file of a particular size.
# prealloc name size ( in bytes)
File must not exist or it will fail...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to create a file, that has a fixed size, as a placeholder so no one will write to that disc and I may store backup files at a later date. how can I do this?
Using HP 9000/300 computer with HP 7937 Disc Drives and HPUX 6.5 OS. (3 Replies)
Discussion started by: dblevans
3 Replies
2. AIX
Hello, this is my first post.
I have a user who cannot create a file over 2 GB's in size eventhough the FS is large file enabled and I added a special stanza in /etc/security/limits to allow an unlimited file size for this particular user (user1 - see below).
ibm:/home/root (4062)#cat... (7 Replies)
Discussion started by: AIXtexas
7 Replies
3. Shell Programming and Scripting
Hi
By using the following command i am creating a file with specified size but it is creating with some text file. ut i want some zero equipped file.
dd if=/dev/zero of=myfile bs=1024 count=10 (0 Replies)
Discussion started by: suneelkumar
0 Replies
4. Shell Programming and Scripting
What is the best way to create 'n' number of files of size 'x'
lets say n and x are given as arguments to the program..
and lets say we can simply fill the files with 0s or *'s
Thanks !! (2 Replies)
Discussion started by: the_learner
2 Replies
5. UNIX for Dummies Questions & Answers
How can create a directory with 1GB size? (6 Replies)
Discussion started by: johnveslin
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need to create a file using touch command . I want the size to be of
300 MB . Is it possible with touch or any other command.
Thanx for your help. (2 Replies)
Discussion started by: reply2soumya
2 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
Linux - Is there any way of creating a new file and determining its record size upon creation?
open() and creat() do not refer to record size.
Thanks... (2 Replies)
Discussion started by: klafte
2 Replies
8. UNIX for Dummies Questions & Answers
Hello All,
Here is seeking a bit of help in trying to solve a problem.
I am required to create a csv file as shown below:
output.csv ->
output_1,output_2,output_3,...,output_<N>
filename1:20,filename2:30,filename3:30,...,filename<N>:30
by listing output_1, output_2,... , output<N> as... (3 Replies)
Discussion started by: vkumbhakarna
3 Replies
9. Shell Programming and Scripting
I basically need to do what the title says.
I have my text file.
I'm still pretty new at this.
At the moment I know that:
1. wc -l file.txt
To get the number of lines.
2. ls -lh file.txt
To get the file size.
But I need to divide both numbers. Then I need to save the output in a... (7 Replies)
Discussion started by: PainMaker101
7 Replies
10. UNIX for Beginners Questions & Answers
I have a script that sorts and processes unsorted files to newly created directories.
Its working great, but I am trying to understand the leanest method to get the script to create an additional file within each newly created directory that:
Contains a list of all files in the directory... (4 Replies)
Discussion started by: Braveheart
4 Replies
LEARN ABOUT SUNOS
mkfs_udfs
mkfs_udfs(1M) System Administration Commands mkfs_udfs(1M)
NAME
mkfs_udfs - construct a udfs file system
SYNOPSIS
mkfs -F udfs [generic_options] [-o specific_options] raw_device_file [size]
DESCRIPTION
This is the universal disk format file system (udfs) -specific module of the mkfs command. mkfs constructs a udfs file system with a root
directory.
OPTIONS
See mkfs(1M) for the list of supported generic_options.
The following options are supported:
-o specific_options Specify a udfs-specific option. Specify udfs file system specific options in a comma-separated list with no inter-
vening spaces. If invalid options are specified, a warning message is printed and the invalid options are ignored.
The following specific_options are available:
N
Print the file system parameters without actually creating the file system.
label=string
Specify the label to be written into the volume header structures. Specify string as the name of the label. If
string is not specified, a default string is generated in the form of *NoLabel*.
OPERANDS
The following operands are supported:
raw_device_file Specify the disk partition on which to write.
size Specify the number of 512-byte blocks in the file system.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWudf |
+-----------------------------+-----------------------------+
SEE ALSO
fsck(1M),mkfs(1M), attributes(5)
DIAGNOSTICS
not currently a valid file system
The specified device does not contain a valid udfs file system.
Invalid size: larger than the partition size
Number of blocks given as parameter to create the file system is larger than the size of the device specified.
is mounted can't mkfs
Device is in use, cannot create file system when the device is in use.
preposterous size
Negative size parameter provided is invalid.
sector size must be between 512, 8192 bytes
Sector size given is not in the valid range.
Volume integrity sequence descriptors too long
File set descriptor too long.
Not enough space to create volume integrity sequence or file set descriptor.
mkfs: argument out of range
One of the arguments is out of range.
mkfs: bad numeric arg
One of the arguments is potentially a bad numeric.
NOTES
You can use lofiadm to create a file that appears to a mkfs command (for example, mkfs_pcfs or mkfs_ufs) as a raw device. You can then use
a mkfs command to create a file system on that device. See lofiadm(1M) for examples of creating a UFS and a PC (FAT) file system on a
device created by lofiadm.
SunOS 5.10 17 Nov 2000 mkfs_udfs(1M)