The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
file splitting UBD Shell Programming and Scripting 7 01-17-2008 03:24 PM
[Splitting file] Extracting group of segments from one file to others ozgurgul Shell Programming and Scripting 1 09-14-2006 12:17 PM
Splitting large files Rvbs Shell Programming and Scripting 2 12-07-2005 08:29 AM
splitting file rkl1 UNIX for Dummies Questions & Answers 3 11-30-2005 03:39 PM
Splitting large file into small files dncs Shell Programming and Scripting 4 06-08-2005 11:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-12-2001
simmonet simmonet is offline
Registered User
  
 

Join Date: Sep 2001
Posts: 3
Unhappy Splitting a large log file

Okay, absolute newbie here...

I'm on a Mac trying to split an almost 2 Gig log file on a Unix box into manageable chunks for my web-based log analysis tool.

What do I need to do, what programs do I need to do it?

All and any help appreciated/needed :-)

Cheers
  #2 (permalink)  
Old 09-13-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Why, use the split command, of course!
See the split man page for details on use.

Note: It may be very important to stop the process creating the log file, if even for only a moment, while you work on the log. The best idea is to move the log file to another name, then create a new logfile with the same name for the webserver to write to. If the webserver tries to write to a log, and the log is locked for editing or doesn't exist, it can cause some problems.
  #3 (permalink)  
Old 09-13-2001
simmonet simmonet is offline
Registered User
  
 

Join Date: Sep 2001
Posts: 3
Talking

"Split Man"... how do I find this?

Thanks for your help

Grant
  #4 (permalink)  
Old 09-13-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Well, the command itself it called split. For more information on this, simply type:
man split
If split is installed on your system, it will display the manual page (hence the command 'man' - it's short for manual).

Hope that helps!
  #5 (permalink)  
Old 09-18-2001
jerzey4life jerzey4life is offline
Registered User
  
 

Join Date: Sep 2001
Location: GUess
Posts: 15
try this to slpit the file by each line.


slpit -i 300 -a1 filename

300 being how many lines per file

1 being the files will be named using xa xb xc xd xc etc....


if u use 2 xaa xbb xcc ( just gives you more files to play with)

have fun


man pages are good, but most times it looks like bad driving directions


enjoy
  #6 (permalink)  
Old 09-18-2001
simmonet simmonet is offline
Registered User
  
 

Join Date: Sep 2001
Posts: 3
Split woes

I'm going to give it all a go and let you know how it works out.

Can anyone give me one last pointer as to how to split the file by date?

Thanks all!!

Grant
  #7 (permalink)  
Old 09-19-2001
cfoxwell cfoxwell is offline
Registered User
  
 

Join Date: Mar 2001
Location: UK
Posts: 20
You could check on the sort command..
Closed Thread

Bookmarks

« linux 7.0 | Vmstat »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0