coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Monday September 6, 2010


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 26 guests online

Newest Member

Starmamex

Hit Counter
4760896 Visitors

cool Statistics
coolcommands:1313
Categories:82
Total queries:523831
Members:4281





Search coolcommands.com
Search Keyword:


coolcommand

split a large file into several smaller ones
Description

To split a large file into several smaller ones:

split [ -l LineCount ] [ File [ Prefix ] ]

Description

The split command reads the specified file and writes it in 1000-line pieces to a set of output files.

Flags

-b Number Splits the file into the number of bytes
-l LineCount Specifies the number of lines in each output file. The default is 1000 lines.

Examples

1. To split a file into 1000-line segments, enter:

# split book

This example splits book into 1000-line segments named xaa, xab, xac, and so forth.

2. To split a file into 50-line segments and specify the file-name prefix, enter:

# split -l 50 book sect

This example splits book into 50-line segments named sectaa, sectab, sectac, and so forth.

3. To split a file into 2KB segments, enter:

# split -b 2k book

This example splits the book into 2*1024-byte segments named xaa, xab, xac, and so forth.

4. To split a file into more than 676 segments, enter:

# split -l 5 -a 3 book sect

This example splits a book into 5-line segments named sectaaa, sectaab, sectaac, and so forth, up to sectzzz (a maximum of 17,576 files).
Example

split -l 2000 FILE

Return to search results

Random coolcommands

coolcommand: eject - how to eject removable media in Linux
Example: eject cdrom
[show me the details]
coolcommand: diagrpt - how to display previous diagnostic results in IBM AIX
Example: /usr/lpp/diagnostics/bin/diagrpt
[show me the details]
coolcommand: DB2 - check if there are locks on an IBM DB2 instance
Example: db2 get snapshot for locks on db2instance
[show me the details]
coolcommand: ln - how to created a symbolic (soft) or hard link
Example: ln /www/home1 /www; ln -s /usr/local/apache2 /usr/local/apache
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1138
audet37
kah00na32
Mariom24
lebjf00013

Top 5 Searches

Category Solaris42690
Category AIX38082
Category General UNIX34254
solaris20802
aix19388

Terms of Use
Privacy
Contact


 
coolcommands.com © 2010. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum