|
| cool Statistics |
| | coolcommands: | 1313 | | Categories: | 82 | | Total queries: | 523831 | | Members: | 4281 | |
|
|
|
 |
|
|
Search coolcommands.com
 |
Submitted by:
lvo   |
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
|  |  |  |  |
|
|
|
|
 |
|
|
|
Top 5 Submitters
|
|---|
| lvo | 1138 |
| audet | 37 |
| kah00na | 32 |
| Mariom | 24 |
| lebjf000 | 13 |
Top 5 Searches
|
| Category Solaris | 42690 |
| Category AIX | 38082 |
| Category General UNIX | 34254 |
| solaris | 20802 |
| aix | 19388 |
|
|
|
|