Sponsored Content
Top Forums Shell Programming and Scripting script to splite large file to number of small files Post 302214440 by krishmaths on Monday 14th of July 2008 05:31:29 AM
Old 07-14-2008
If you have not known about the split command, then please have a look
Code:
man split

I hope you may need to use the -l option.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting large file into small files

Hi, I need to split a large file into small files based on a string. At different palces in the large I have the string ^Job. I need to split the file into different files starting from ^Job to the last character before the next ^Job. Also all the small files should be automatically named.... (4 Replies)
Discussion started by: dncs
4 Replies

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

3. Shell Programming and Scripting

Split large file and add header and footer to each small files

I have one large file, after every 200 line i have to split the file and the add header and footer to each small file? It is possible to add different header and footer to each file? (7 Replies)
Discussion started by: ashish4422
7 Replies

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

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

8. Shell Programming and Scripting

Breaking large file into small files

Dear all, I have huge txt file with the input files for some setup_code. However for running my setup_code, I require txt files with maximum of 1000 input files Please help me in suggesting way to break down this big txt file to small txt file of 1000 entries only. thanks and Greetings, Emily (12 Replies)
Discussion started by: emily
12 Replies

9. Shell Programming and Scripting

Removing large number of temp files

Hi All, I am having a situation now to delete a huge number of temp files created during run times approx. 16700+ files. We have never imagined that we will get this this much big list of files during run time. It worked fine for lesser no of files in the list. But when list is huge we are... (7 Replies)
Discussion started by: mad man
7 Replies

10. UNIX for Beginners Questions & Answers

Split large file into 24 small files on one hour basis

I Have a large file with 24hrs log in the below format.i need to split the large file in to 24 small files on one hour based.i.e ex:from 09:55 to 10:55,10:55-11:55 can any one help me on this.! ... (20 Replies)
Discussion started by: Raghuram717
20 Replies
OGMSPLIT(1)							   User Commands						       OGMSPLIT(1)

NAME
ogmsplit - Split OGG/OGM files into several smaller OGG/OGM files SYNOPSIS
ogmsplit [options] inname DESCRIPTION
ogmsplit can be used to easily split an OGM file after a given size. Several OGM files will be created that each start with a keyframe. inname Use 'inname' as the source. -o, --output out Use 'out' as the base name. Ascending part numbers will be appended to it. Default is 'inname'. Examples: 1) If -o output.ogg is given on the command line then ogmsplit will create output-000001.ogg, output-000002.ogg and so on. 2) If no -o option is given and the input's name is movie.ogm then ogmsplit will create movie-000001.ogm and so on. The operation mode can be set with exactly one of -s, -t, -c or -p. The default mode is to split by size (-s). -s, --size size Size in MiB ( = 1024 * 1024 bytes) after which a new file will be opened (approximately). Default is 700MiB. Size can end in 'B' to indicate 'bytes' instead of 'MiB'. -t, --time time Split after the given elapsed time (approximately). 'time' takes the form HH:MM:SS.sss or simply SS(.sss), e.g. 00:05:00.000 or 300.000 or simply 300. -c, --cuts cuts Produce output files as specified by cuts, a list of slices of the form "start-end" or "start+length", separated by commas. If start is omitted, it defaults to the end of the previous cut. start and end take the same format as the arguments to -t. -n, --num num Don't create more than num separate files. The last one may be bigger than the desired size. Default is an unlimited number of files. Can only be used with -s or -t. --frontend Frontend mode. Progress output will be terminated by instead of . -p, --print-splitpoints Only print the key frames and the number of bytes encountered before each. Useful to find the exact splitting point. -v, --verbose Be verbose and show each OGG packet. Can be used twice to increase verbosity. -h, --help Show this help. -V, --version Show version information. CHAPTER INFORMATION
ogmsplit correctly handles chapter information. During the first pass the chapter information, if any is present, will be adjusted to match the output files generated. Chapters that are not contained in the current output file are removed entirely. The other chapters are renum- bered to start at 1, and their timestamps will be recalculated. Example: If your source file contains these four chapters: CHAPTER01=00:00:00.000 CHAPTER01NAME=Chapter 01 CHAPTER02=00:10:00.000 CHAPTER02NAME=Chapter 02 CHAPTER03=00:20:00.000 CHAPTER03NAME=Chapter 03 CHAPTER04=00:25:00.000 CHAPTER04NAME=Chapter 04 and you split after 15 minutes, then the first output file will only contain the first two chapters as shown above, and the second output file will contain the following two chapters and the remaining part of the first: CHAPTER01=00:00:00.000 CHAPTER01NAME=Chapter 02 (continued) CHAPTER02=00:05:00.000 CHAPTER02NAME=Chapter 03 CHAPTER03=00:10:00.000 CHAPTER03NAME=Chapter 04 Note that only variable names are changed, not the chapter names themselves. The exception is the first chapter of the second and follow- ing files where "(continued)" is appended in order to indicate that this is not the start of this chapter. If you want to change them as well you'll have to remerge the resulting file with a new chapter file. AUTHOR
ogmsplit was written by Moritz Bunkus <moritz@bunkus.org>. SEE ALSO
ogmmerge(1), ogminfo(1), ogmdemux(1), ogmcat(1), dvdxchap(1) WWW
The newest version can always be found at <http://www.bunkus.org/videotools/ogmtools/> <http://www.bunkus.org/videotools/ogmtools/> ogmsplit v1.5 November 2004 OGMSPLIT(1)
All times are GMT -4. The time now is 11:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy