Labthrift Labthrift What to buy. What to skip. Why.

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

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.

Also on this topic

SSH from the couchType commands on the computer from your laptop, on the house network. Password login first. Don't open this to the internet. Encode a file so you can paste itAfter SSH works, turn a file into pasteable text with base64 so you can copy small text without a USB stick. You don't need a zip app for this. Run one command per lineAfter SSH works, run one command once per line with xargs so a list drives many short jobs. You don't need a scripting app for this. Shrink one fileAfter SSH works, shrink one file with gzip so a copy is smaller. You don't need a zip app for this. Pack files into one archiveAfter SSH works, pack files into one archive with tar so you can copy one file instead of a folder. You don't need a zip app for this. Copy a file to the computer from your laptopAfter SSH works, use scp to move one file without a USB stick. You don't need a NAS for this. Download a file onto the computerAfter SSH works, pull one file from a web address with curl. You don't need a browser on the computer for this. Check a file fingerprintAfter SSH works, check a file with sha256sum so you know it still matches the fingerprint you expected. You don't need a download manager for this. See whether two files are the sameAfter SSH works, compare two files with diff so you can tell if the spare still matches. You don't need a file viewer for this. Delete a file carefullyAfter SSH works, delete one file with rm -i. Ask first. Skip rm -rf. You don't need a NAS for this. Sync files so only changes copyAfter SSH works, sync files with rsync so a copy only moves what changed. You don't need a NAS sync app for this. Browse folders then copy one fileAfter SSH works, browse folders with sftp so you can pick a file and copy it. You don't need FileZilla or a NAS for this. Turn off password login once the key worksAfter the laptop key login is boring, tell SSH to stop accepting the password. The key is how you get in. A keyboard on the computer is the backup now. Keep the computer on the house networkSSH and Pi-hole belong on the house network. Skip this if you never opened the router settings. Don't forward port 22.