Sponsored Content
Top Forums Shell Programming and Scripting Create n number of files of size x Post 302116273 by the_learner on Wednesday 2nd of May 2007 06:14:33 PM
Old 05-02-2007
Create n number of files of size x

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 !!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

to create a file of specified size

hi guys, Is there any way to create a file of specified size ..ie...during creation itself u should be able to specify the size of it... (12 Replies)
Discussion started by: deep
12 Replies

2. Shell Programming and Scripting

bash script working for small size files but not for big size files.

Hi, I have one file stat. Stat file contents are as follows: for example. H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000 H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000 Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies

3. Shell Programming and Scripting

To create a file of spcified size

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. UNIX for Dummies Questions & Answers

How can create a directory with 1GB size?

How can create a directory with 1GB size? (6 Replies)
Discussion started by: johnveslin
6 Replies

5. UNIX for Dummies Questions & Answers

need to create a file of specified size

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

6. 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

7. UNIX for Dummies Questions & Answers

Command for total number of files (and size) across subdirectories?

Hi all... I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files. What I want to know is: How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
Discussion started by: Beun
9 Replies

8. UNIX for Dummies Questions & Answers

How to separate a single column file into files of the same size (i.e. number of rows)?

I have a text file with 1,000,000 rows (It is a single column text file of numbers). I would like to separate the text file into 100 files of equal size (i.e. number of rows). The first file will contain the first 10,000 rows, the second row will contain the second 10,000 rows (rows 10,001-20,000)... (2 Replies)
Discussion started by: evelibertine
2 Replies

9. Shell Programming and Scripting

How to count number of files in directory and write to new file with number of files and their name?

Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies

10. Shell Programming and Scripting

Divide number of lines by the size of the same file. And create relational table.

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
unget(1)						      General Commands Manual							  unget(1)

NAME
unget - Cancels a previous get command SYNOPSIS
unget [-n] [-s] [-r SID] file... | - STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: unget: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Each option or group of options applies independently to each named file. Prevents the automatic deletion of the file obtained by get, the g-file. This option lets you retain the edited version of the file without making a delta. Specifies the new delta that would have been created by the next use of the delta command. You must use this option if you have two or more pending deltas to the file under the same login name. You can look at the p-file to see if you have more than one delta pending to a particular SID under the same login name. The SID specification must unambiguously specify only one SID to discard, or unget displays an error message and stops running. Suppresses displaying the deleted SID. OPERANDS
Pathname of an existing SCCS file or directory. If you specify a directory unget performs the requested actions on all SCCS files (those files with the s. prefix). If you specify a - (dash) in place of file, standard input is read, and each line of standard input is interpreted as the name of a Source Code Control System (SCCS) file. An End-of-File character terminates input. DESCRIPTION
The unget command lets you restore a g-file created with a get -e before the new delta is created, and therefore discard the changes (see the get and delta commands). The unget command lets you reverse the effect of a get -e command done prior to creating the intended new delta. [Tru64 UNIX] The file name or names refer to the SCCS s-files, not the g-files. If the s-files are not in the working directory, the names must include the path to the SCCS directory. During processing of file, a locking z-file, and a q-file (a working copy of the p-file), may be created and deleted. The p-file and g-file are deleted. See get(1) for the descriptions and usage of these files. EXIT STATUS
The following exit values are returned. Successful completion. An error occurred. EXAMPLES
To discard the changes you have made to an SCCS file after doing a get -e, enter: unget s.prog.c The previous example illustrates use of unget for an s-file in the working directory. The following example illustrates use of the command for an s-file in a different directory: unget /usr/projects/myproject/SCCS/s.prog.c ENVIRONMENT VARIABLES
The following environment variables affect the execution of unget: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-specific default locale is used. If any of the internationalization variables contain an invalid setting, unget behaves as if none of the variables had been defined. If set to a non- empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single, as opposed to multibyte, characters in arguments and input files). Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: admin(1), cdc(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sact(1), sccs(1), sccsdiff(1), sccshelp(1), val(1), what(1) Files: sccsfile(4) Standards: standards(5) Programming Support Tools unget(1)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy