The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find a file whick is consuming larger disk space in file system lokeshpashine UNIX for Dummies Questions & Answers 3 01-04-2008 01:26 PM
Cutting a large log file in to smaller ones MrTangent Shell Programming and Scripting 11 11-07-2007 02:55 AM
Grab a smaller and larger value Raynon Shell Programming and Scripting 3 10-11-2007 03:23 AM
[Splitting file] Extracting group of segments from one file to others ozgurgul Shell Programming and Scripting 1 09-14-2006 09:17 AM
file splitting rintingtong Shell Programming and Scripting 1 04-16-2004 11:09 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-21-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
Stumble this Post!
Splitting a Larger File Into Mutiple Smaller ones.

Hello..

Iam in need to urgent help with the below.

Have data-file with 40,567 [some random num,which is greater that 40,000]
and need to split them into multiple files with smaller line-count.

Iam aware of "split" command with -l option which allows you to specify the no of lines in smaller files ,with the target file-name pattern but catch is i also need to store the exact names of smaller file names and also the no of files.

Can you folks assit me here plz.

Thx,
Madhu
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-22-2008
jgt jgt is offline
Registered User
 

Join Date: Apr 2007
Location: 44.21.48N 80.50.15W
Posts: 348
Stumble this Post!
Create a new directory.
Then cd to that directory
Then run split as
#split -l1000 /u/abc/filename
Then all the output and only the output will be in the current directory.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0