Written 30 Aug 2026. This is a how-to, not a product card.
Split a file into smaller pieces
After SSH works, split one file into smaller pieces with split so a paste or copy fits size limits. You don't need a zip app for this.
A paste or copy sometimes has a size limit. Tonight you cut one file into pieces: split. Split cuts one file into smaller files. Start with a 200-line practice file, fifty lines per piece. You are still only practicing in home on the computer. It does not need a zip app for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If encode for paste is what you want, that is encode a file so you can paste it. If shrink is what you want, that is shrink one file. If a folder packed is what you want, that is pack files into one archive. Skip huge ISOs and whole disks as tonight's lesson.
What this is
split cuts one file into smaller pieces. You type split -l 50, then the file, then a prefix in home. -l 50 means fifty lines per piece. Names look like pieces-me-aa, pieces-me-ab. -b 1k is about one kilobyte per piece. Stick with split by lines first. It is not tar. Tar packs a folder. It is not gzip. Gzip shrinks one file. Skip csplit, zip split, rar, and 7z tonight.
Practice split in home
SSH in. Make sure home is where you sit:
pwd
You want a path that ends in your login name. If not:
cd ~
Make a 200-line practice file:
seq 1 200 > ~/pieces-me.txt
wc -l ~/pieces-me.txt
You want 200. Split by lines into pieces of fifty. The prefix stays in home:
split -l 50 ~/pieces-me.txt ~/pieces-me-
List the pieces:
ls ~/pieces-me-*
You want names like pieces-me-aa, pieces-me-ab, and so on. Count lines on each piece:
wc -l ~/pieces-me-*
You want fifty lines on most pieces, and two hundred lines total when you include the original. That is enough for tonight. Practice only in home.
Debian and Ubuntu usually already have split. Don't make apt the job. If split is missing:
sudo apt install coreutils
Then stop. That install is not the lesson.
When you are done, throw the practice files away. Careful delete only. That is delete a file carefully. Skip rm -rf.
rm -i ~/pieces-me.txt ~/pieces-me-back.txt ~/pieces-me-*
Useful extras, still home only
Optional: split by bytes for a size limit:
split -b 1k ~/pieces-me.txt ~/pieces-me-b-
-b 1k means about one kilobyte per piece. Stick with split by lines first.
Optional: numbered suffixes on GNU split (Debian and Ubuntu):
split -d -l 50 ~/pieces-me.txt ~/pieces-me-
-d means digits instead of letters. Handy when you want pieces-me-00 style names.
Put the pieces back into one file:
cat ~/pieces-me-aa ~/pieces-me-ab ~/pieces-me-ac ~/pieces-me-ad > ~/pieces-me-back.txt
Or, if your pieces are only the letter names and you listed them in order:
cat ~/pieces-me-a* > ~/pieces-me-back.txt
Be careful: glob order usually matches letter order for short prefixes. Compare length:
wc -l ~/pieces-me.txt ~/pieces-me-back.txt
You want the same line count. Optional compare:
diff ~/pieces-me.txt ~/pieces-me-back.txt
Quiet compare means the files match. For a fingerprint instead, that is check a file fingerprint.
Skip huge ISOs and whole disks as tonight's lesson. Tonight's split is for a paste limit or a copy limit on a practice file, not a disk image.
What this is not
This is not encode for paste. That is encode a file so you can paste it. It is not pack for a folder. That is pack files into one archive. It is not shrink for one file. That is shrink one file. It is not run-once-per-line. That is run one command per line. It is not a USB backup. That is a backup of the folder. It is not opening SSH to the internet. That is keep the computer on the house network. Don't forward port 22.
What next
Need encode for paste? Encode a file so you can paste it. Need shrink? Shrink one file. Need a folder packed? Pack files into one archive. Need sync so only changes copy? Sync files so only changes copy. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip huge ISOs and whole disks tonight. Practice split on a home file first.
- Skip csplit, zip split, rar, and 7z as tonight's names.
- Skip splitting into
rmpipelines. Careful delete only: delete a file carefully. - Skip buying a zip app. Debian and Ubuntu already ship
split. - Skip if you actually need the USB backup. That is a backup of the folder.
- Skip files under
/etc, SSH folders, or paths you don't own. Practice only in home. - Skip
rm -rf. Careful delete only: delete a file carefully. - Skip opening SSH to the internet so you can do this from a coffee shop. That is keep the computer on the house network. Don't forward port 22.
Sources
Debian: split. Ubuntu: split. GNU coreutils: split invocation. Official pages only. For the login, see SSH from the couch. For encode, see encode a file so you can paste it.