Splitting Files with split

Suppose you’re futzing with your new digital camera and want to share a photo of your new computer (what else is cool enough to take pictures of?!) via email with your friends and family. You access the file, attach it to an email message, and then—argh!—your ISP fails to send the file because it’s too big. While you could modify the file itself—reduce the physical size, reduce the number of colors used, or crop out nonessential parts, for example—you can also just split the file with split. For example, if the ISP tells you that no files larger than 0.51 MB will be accepted, you can use split to send the file in chunks—all using one easy command (Code Listing 6.23).

Code Listing 6.23. Use split to break files into ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.