Sponsored Content
Top Forums Shell Programming and Scripting Creating large number of files of specific size Post 302328277 by swatideswal on Wednesday 24th of June 2009 02:02:28 AM
Old 06-24-2009
Question 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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

moving large number of files

I have a task to move more than 35000 files every two hours, from the same directory to another directory based on a file that has the list of filenames I tried the following logics (1) find . -name \*.dat > list for i in `cat list` do mv $i test/ done (2) cat list|xargs -i mv "{}"... (7 Replies)
Discussion started by: bryan
7 Replies

2. Shell Programming and Scripting

Script to Compare a large number of files.

I have a large Filesystem on an AIX server and another one on a Red Hat box. I have syncd the two filesystems using rsysnc. What Im looking for is a script that would compare to the two filesystems to make sure the bits match up and the number of files match up. its around 2.8 million... (5 Replies)
Discussion started by: zippdawg2001
5 Replies

3. Shell Programming and Scripting

highly specific search and replace for a large number of files

hey guys, I have a directory with about 600 files. I need to find a specific word inside a command and replace only that instance of the word in many files. For example, lets say I have a command called 'foo' in many files. One of the input arguments of the 'foo' call is 'bar'. The word 'bar'... (5 Replies)
Discussion started by: ksubrama
5 Replies

4. Shell Programming and Scripting

Columns comparision of two large size files and printing the difference

Hi Experts, My requirement is to compare the second field/column in two files, if the second column is same in both the files then compare the first field. If the first is not matching then print the first and second fields of both the files. first file (a .txt) < 1210018971FF0000,... (6 Replies)
Discussion started by: krao
6 Replies

5. Shell Programming and Scripting

Concatenation of a large number of files

Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example VOICE_0000000000 VOICE_1223o23u0 VOICE_934934927349 I use the following code: cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE ... (10 Replies)
Discussion started by: chriss_58
10 Replies

6. UNIX for Dummies Questions & Answers

Delete large number of files

Hi. I need to delete a large number of files listed in a txt file. There are over 90000 files in the list. Some of the directory names and some of the file names do have spaces in them. In the file, each line is a full path to a file: /path/to/the files/file1 /path/to/some other/files/file 2... (4 Replies)
Discussion started by: inakajin
4 Replies

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

8. UNIX for Dummies Questions & Answers

Rename a large number of files in subdirectories

Hi, I have a large number of subdirectories (>200), and in each of these directories there is a file with a name like "opp1234.dat". I'd like to know how I could change the names of these files to say "out.dat" in all these subdirectories in one go. Thanks! (5 Replies)
Discussion started by: lost.identity
5 Replies

9. Shell Programming and Scripting

Sftp large number of files

Want to sftp large number of files ... approx 150 files will come to server every minute. (AIX box) Also need make sure file has been sftped successfully... Please let me know : 1. What is the best / faster way to transfer files? 2. should I use batch option -b so that connectivity will be... (3 Replies)
Discussion started by: vegasluxor
3 Replies

10. Shell Programming and Scripting

Find Large Files Recursively From Specific Directory

Hi. I found many scripts in the web of achieving this. But I like to use this one find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command? My... (7 Replies)
Discussion started by: aimy
7 Replies
comb(1) 						      General Commands Manual							   comb(1)

NAME
comb - combine SCCS deltas SYNOPSIS
SID] list] file ... DESCRIPTION
The command generates a shell procedure (see sh(1)) which, when run, reconstructs the given SCCS files. The reconstructed files are usu- ally smaller than the original files. Arguments can be specified in any order, but all options apply to all named SCCS files. If a direc- tory is named, behaves as though each file in the directory were specified as a named file, except that non-SCCS files (last component of the path name does not begin with and unreadable files are silently ignored. If a name of is given, the standard input is read; each line of the standard input is taken to be the name of an SCCS file to be processed; non-SCCS files and unreadable files are silently ignored. The generated shell procedure is written on the standard output. Options recognizes the following options. Each is explained as if only one named file is to be processed, but the effects of any option apply independently to each named file. The SCCS IDentification string (SID) of the oldest delta to be preserved. All older deltas are discarded in the recon- structed file. A list of deltas to be preserved (see get(1) for the syntax of a list). All other deltas are discarded. For each generated, this option causes the reconstructed file to be accessed at the release of the delta to be created, other- wise the reconstructed file would be accessed at the most recent ancestor. Use of the option can decrease the size of the reconstructed SCCS file. It can also alter the shape of the delta tree of the original file. This option causes to generate a shell procedure which, when run, produces a report giving, for each file: the file name, size (in blocks) after combining, original size (also in blocks), and percentage change computed by: 100 x (original - combined) / original It is recommended that this option be used before any SCCS files are actually combined to determine exactly how much space is saved by the combining process. If no options are specified, preserves only leaf deltas and the minimal number of ancestors needed to preserve the tree. EXTERNAL INFLUENCES
International Code Set Support Single- and multi-byte character code sets are supported. DIAGNOSTICS
Use sccshelp(1) for explanations. EXAMPLES
The command: creates a shell script named which if executed, creates a new using only the deltas from the old The script overwrites the old thus, it might be wise to copy the original elsewhere. Here is an example of typical technique: WARNINGS
may rearrange the shape of the tree of deltas. Combining files may or may not save space; in fact, it is possible for the reconstructed file to actually be larger than the original. FILES
Temporary file Temporary file SEE ALSO
admin(1), delta(1), get(1), sccshelp(1), prs(1), sh(1), sccsfile(4). comb(1)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy