# # split
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Split

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2003 Tony Lawrence

Breaks a file up into separate files, either by lines or bytes.


split -l1 /etc/passwd
 

will create a new file (xaa,xab, etc.) for each line of /etc/passwd.

Split is useful when you need to send a large file to someone whose isp enforces quotas on the size of mail files.

You can control the naming convention:

split -l 5000 bigfile foo.
 

will create 5000 line chunks named foo.aa, foo.ab etc. Some versions of split do that differently; check your man page.

To re-combine the files, use

cat foo.* > newbigfile
 

or, on a Windows machine,

copy FOO.* /B newbigfile /b
 

If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> split


Inexpensive and informative Apple related e-books:

Take Control of Upgrading to El Capitan

Take Control of iCloud, Fifth Edition

Photos for Mac: A Take Control Crash Course

Sierra: A Take Control Crash Course

Take Control of Automating Your Mac





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





While modern technology has given people powerful new communication tools, it apparently can do nothing to alter the fact that many people have nothing useful to say. (Leo Gomes)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode