Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Split large file into 24 small files on one hour basis Post 303036429 by Raghuram717 on Wednesday 26th of June 2019 05:14:58 AM
Old 06-26-2019
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.!

Code:
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,grpThreads,allThreads,URL,Latency,IdleTime
2019-05-20 09:55:39.945,142,GETHome,200,OK,SequenceLength 1-50,text,true,,9937,1,2,http://bus00bpo.us.oracle.com:8181/,141,0
2019-05-20 09:55:33.820,217,GETHome,200,OK,SequenceLength 1-50,text,true,,9937,1,2,http://bus00bpo.us.oracle.com:8181/,217,0
2019-05-20 09:55:34.550,103,GETregistry,200,OK,SequenceLength 1-50,text,true,,66305,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/registry,102,0
2019-05-20 09:55:35.739,47,GETPublish,200,OK,SequenceLength 1-50,text,true,,1068,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/publish,46,0
2019-05-20 09:55:36.016,1254,GEThomeLayout,200,OK,SequenceLength 1-50,text,true,,170861,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/pages/layout/home?ccvp=lg,1252,0
2019-05-20 09:55:38.069,356,GEThomeCurrentData,200,OK,SequenceLength 1-50,text,true,,3312,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/pages/home?dataOnly=false&currentDataOnly=true,356,0
2019-05-20 09:55:39.413,454,GEThomeCacheableData,200,OK,SequenceLength 1-50,text,true,,19239,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/pages/home?dataOnly=false&cacheableDataOnly=true&productTypesRequired=true,453,0
2019-05-20 09:55:40.564,38,GEThomeCSS,204,No Content,SequenceLength 1-50,,true,,517,1,2,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/pages/css/home?occsite=siteUS,0,0
.....
....
....
2019-05-21 10:10:31.197,11,GETresourceNsCommon,200,OK,SequenceLength 1-1,text,true,,29169,1,1,http://bus00bpo.us.oracle.com:8181/ccstoreui/v1/resources/ns.common?locale=en,11,0

 

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

Split a file into 16 small files

Hi I want to split a file that has 'n' number of records into 16 small files. Can some one suggest me how to do this using Unix script? Thanks rrkk (10 Replies)
Discussion started by: rrkks
10 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 splite large file to number of small files

Dear All, Could you please help me to split a file contain around 240,000,000 line to 4 files all equally likely , note that we need to maintain that the end of each file should started by start flage (MSISDN) and ended by end flag (End), also the number of the line between the... (10 Replies)
Discussion started by: ahmed.gad
10 Replies

5. Shell Programming and Scripting

Split large zone file dump into multiple files

I have a large zone file dump that consists of ; DNS record for the adomain.com domain data1 data2 data3 data4 data5 CRLF CRLF CRLF ; DNS record for the anotherdomain.com domain data1 data2 data3 data4 data5 data6 CRLF (7 Replies)
Discussion started by: Bluemerlin
7 Replies

6. Shell Programming and Scripting

Split a large array into small chunks

Hi, I need to split a large array "@sharedArray" into 10 small arrays. The arrays should be like @sharedArray1,@sharedArray2,@sharedArray3...so on.. Can anyone help me with the logic to do so :(:confused: (6 Replies)
Discussion started by: rkrish
6 Replies

7. Shell Programming and Scripting

How to split this txt file into small files?

Dear shell experts, I would like to spilt a txt file into small ones. However, I did not know how to program use shell. If someone could help, it is greatly appreciated! Specifically, I supposed there is file named A.txt. The content of the file likes this: Subject run condtion ACC time... (3 Replies)
Discussion started by: psychmyluo
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. UNIX for Beginners Questions & Answers

Split large file into smaller files without disturbing the entry chunks

Dears, Need you help with the below file manipulation. I want to split the file into 8 smaller files but without cutting/disturbing the entries (meaning every small file should start with a entry and end with an empty line). It will be helpful if you can provide a one liner command for this... (12 Replies)
Discussion started by: Kamesh G
12 Replies

10. Shell Programming and Scripting

Split large xml into mutiple files and with header and footer in file

Split large xml into mutiple files and with header and footer in file tried below it splits unevenly and also i need help in adding header and footer command : csplit -s -k -f my_XML_split.xml extrfile.xml "/<Document>/" {1} sample xml <?xml version="1.0" encoding="UTF-8"?><Recipient>... (36 Replies)
Discussion started by: karthik
36 Replies
TRUE(1) 							   User Commands							   TRUE(1)

NAME
true - do nothing, successfully SYNOPSIS
true [ignored command line arguments] true OPTION DESCRIPTION
Exit with a status code indicating success. --help display this help and exit --version output version information and exit NOTE: your shell may have its own version of true, which usually supersedes the version described here. Please refer to your shell's docu- mentation for details about the options it supports. AUTHOR
Written by Jim Meyering. REPORTING BUGS
Report true bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for true is maintained as a Texinfo manual. If the info and true programs are properly installed at your site, the command info coreutils 'true invocation' should give you access to the complete manual. GNU coreutils 7.1 July 2010 TRUE(1)
All times are GMT -4. The time now is 06:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy