Tuesday, February 25, 2020

extracting filenames from packages available in debian

Back in 2016, I wanted to check the names of existing command-line utilities in order to avoid a collision when I renamed my blogging software to wrt.

I wound up using apt-file data to see what binaries are available from Debian packages, and I’ve referenced the list of files I generated then a bunch of times since. It’s obviously way out of date by now, and today I had a similar question to answer, so here’s a scripted version of that process that worked on my current machine, running Debian Buster:


# Make sure we've got apt-file and lz4 compression utils:
sudo apt install apt-file lz4

# Update lists:
sudo apt-file update

cd /var/lib/apt/lists
lz4cat ./*.lz4 | \
  grep -E '^(usr/bin/|sbin/|bin/)' | \
  cut -f1 -d' ' | \
  perl -pe 's/^(.*)\/(.*)$/$2/' | \
  sort | uniq > ~/used_names.txt

Then you can grep whatever ~/used_names.txt to look for binaries.

The main difference here is that the contents lists are now in /var/lib/apt/lists, as LZ4-compressed files named like deb.debian.org_debian_dists_buster_main_Contents-amd64.lz4.

I haven’t taken the time to investigate whether this data is still just loaded for apt-file’s benefit or is in some way more integrated with apt or what. Maybe I’ll revisit at some point.

Today’s used_names.txt is attached to this post just in case it’s helpful to people coming in from web search.

more: used_names.txt

p1k3 / 2020 / 2 / 25
tags: topics/apt, topics/debian, topics/shell, topics/technical

thursday, february 20, 2020

i took the trash out just now,
and turning around to go back inside
caught the layer of new snow in the porch light
it shines more perfectly than
any i've seen in recent memory
almost incorporeal
offers no tangible resistance to my steps
and when i scoop a handful from the ground
in the seconds before it collapses into slush
and meltwater, the outlines of individual
flakes all set on edge against one another are
visible in sharp crystal relief
gleaming stars and polygons, lattices and

p1k3 / 2020 / 2 / 20
tags: topics/poem

Saturday, February 1, 2020

I’m sitting in an airport bar at roughly 11am after my employer’s annual all-hands meeting in San Francisco. I have just paid $15 for avocado toast (which was pretty good) and I am carefully not thinking about how much for a mediocre bloody mary.

SFO is science fictional as fuck, in the way that modern airports along the money’s path tend to be. Automated trains along elevated tracks. Concrete shapes that would work on the cover of some trade paperback featuring a slightly abstracted spaceport. People in face masks because the network made them afraid of a potential pandemic. In the distance out the windows, through the fog slowly burning off, the surface of California’s engineered vastness.

A year ago:

Downtown SF in 2019: A grotesque and surreal environment. Gleaming towers, all the trappings of an unfathomable wealth, the sidewalks and doorways scattered with people in the throes of debilitating addiction and untreated mental illness. You’re quickly socialized to ignore the screaming and step around the bodies and assume that someone else will attend to it if this or that figure sprawled out across the pavement is dead instead of merely unconscious.

This hasn’t changed, as far as I can tell. Maybe it’s worse.

I usually try to travel light these days. A backpack with some changes of clothes, a laptop, a notebook and some pens, toothbrush and some laundry soap for the hotel sink. But of course the lightness of these habits is mostly a fiction, apart from the convenience of skipping baggage claim in airports. What I’m really carrying is ready access to credit and enough social capital to get me through any very likely situation, along with a home in a prosperous and stable region, white skin, a steady job, health insurance, and all the rest of it.

Self-flagellation about having good shit in life seems like a pointless exercise, but I’m aware these days of what feels like a divide becoming a chasm between me and the set of people tending bar, waiting tables, driving for Uber.

The threat of precarity is real for nearly all of us, but it isn’t evenly distributed. Like most people, I’m one bad hospitalization away from financial ruin. In relative terms I also have a hell of a lot more buffer than it’s likely the guy who made my drink does. As long as I stay lucky and stay useful to some slice of the technocracy, that’ll probably stay true. There’s a feeling of sickness in knowing these things. In the movie of my life, it’s something dissonant and droning swelling on the soundtrack while I bullshit my way through these paragraphs on an expensive laptop in a gleaming airport.

p1k3 / 2020 / 2 / 1
tags: topics/airports, topics/california, topics/san-francisco