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

Written 1 Sep 2026. This is a how-to, not a product card.

Compare sorted lists

After join, comm compares sorted lists so practice files show what is only in list 1, only in list 2, or in both. You don't need extra software for this.

Match files on a shared field matched files on a key. Tonight you compare two sorted lists: comm. Comm compares two sorted lists. Start with two tiny practice files already sorted, then comm ~/comm-a.txt ~/comm-b.txt. Comm prints three tab-separated columns. Column 1 is lines only in file 1. Column 2 is lines only in file 2. Column 3 is lines in both. You are still only practicing in home on the computer. It does not need extra system software, htop, Grafana, or a NAS for this one job.

Skip until SSH already works

SSH from the couch should already get you a prompt. If files matched on a shared field are what you want, that is match files on a shared field. If columns side by side without matching keys are what you want, that is join columns side by side. If files compared for edits are what you want, that is see whether two files are the same. Comm needs files already sorted. That sort is put lines in order.

What this is

comm compares sorted lists. You make two tiny practice files, already sorted, then type comm ~/comm-a.txt ~/comm-b.txt. Comm prints three tab-separated columns. Stick with that safe peek: a in column 1, d in column 2, b and c in column 3. Both files must already be sorted. If files are mixed order, comm can miss lines or warn. Put lines in order first: put lines in order. It is not join. Join matches files on a key into one line. It is not paste. Paste joins columns side by side. It is not diff. Diff compares files for edits.

Practice comm 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 two tiny practice files, already sorted:

printf 'a\nb\nc\n' > ~/comm-a.txt

printf 'b\nc\nd\n' > ~/comm-b.txt

Compare sorted lists:

comm ~/comm-a.txt ~/comm-b.txt

You want three tab-separated columns. Column 1 is a. Column 2 is d. Column 3 is b then c. Then the prompt back. That is enough for tonight. Practice only in home.

Don't make sort the job. If files later need order, that is put lines in order.

Debian and Ubuntu usually already have comm. Don't make apt the job. If comm 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 ~/comm-a.txt ~/comm-b.txt

Useful extras, still home only

Optional: only lines in both:

comm -12 ~/comm-a.txt ~/comm-b.txt

Optional: only lines in file 1:

comm -13 ~/comm-a.txt ~/comm-b.txt

Optional: only lines in file 2:

comm -23 ~/comm-a.txt ~/comm-b.txt

-1 hides column 1, and so on. Don't make those required. You can stay on default print.

What this is not

This is not join. That is match files on a shared field. It is not cmp. That is see whether two files match byte for byte. It is not sort as the job. That is put lines in order. It is not uniq. That is drop duplicate lines. It is not paste. That is join columns side by side. It is not diff. That is see whether two files are the same. 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 files matched on a key? Match files on a shared field. Need byte-for-byte compare? See whether two files match byte for byte. Need files sorted first? Put lines in order. Need the practice files gone? Delete a file carefully. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.

Skip

Sources

Debian: comm(1). Ubuntu: comm(1). Official pages only. For the login, see SSH from the couch. For matching on a key, see match files on a shared field.

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. Match files on a shared fieldAfter column, match two practice files on a shared field with join so the lists line up on a key. You don't need extra software for this. See whether two files match byte for byteAfter comm, compare two files byte for byte with cmp so you know if they match. You don't need extra software for this. Put lines in orderAfter SSH works, put lines in order with sort so a mixed list is easier to scan. You don't need a file manager for this. Drop duplicate linesAfter SSH works, drop duplicate lines with uniq so a mixed list shows each line once. You don't need a file manager for this. Join columns side by sideAfter SSH works, join columns side by side with paste so two lists become one line each. You don't need a file 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. Send output into another commandAfter SSH works, send output into another command with | so a long dump does not flood the window. You don't need a file manager 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. 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.