Monday, July 11

extracting all (?) of the filenames from packages available in debian

I’m thinking about renaming a command-line utility, and I want to pick something that isn’t already taken. I decided that getting a list of the command names available in Debian packages, maybe with the addition of some lists like Wikipedia’s List of Unix commands, would be a decent start at this.

I thought that maybe apt-cache could give me what I wanted, but a quick look at the man page wasn’t that helpful. Google brought me to this writeup by Kevin van Zonneveld on apt-file, which lets you search for packages by filenames they contain. Something like so:

$ sudo apt-get install apt-file
$ apt-file update
$ apt-file search /some/path

This will show you packages which provide files containing /some/path. It’s supposed to take patterns (Perl regexps? The usual grep flavor? POSIX?), but I’m not quite sure whether I ever got it to just print all filenames.

Eventually I figured out that it keeps a cache of filenames in ~/.cache/apt-file/:

$ cd ~/.cache/apt-file && ls
ftp.us.debian.org_debian_dists_jessie_contrib_Contents-amd64.gz
ftp.us.debian.org_debian_dists_jessie_main_Contents-amd64.gz
ftp.us.debian.org_debian_dists_jessie_non-free_Contents-amd64.gz
ftp.us.debian.org_debian_dists_jessie-updates_main_Contents-amd64.gz

These have some commentary at the top, followed by data in the following format:

FILE                                                    LOCATION
bin/ash                                                 shells/ash
bin/bash                                                shells/bash
bin/bash-static                                         shells/bash-static
bin/bsd-csh                                             shells/csh
...

Here is a dumb command to get the names of commands from these files:

zcat ~/.cache/apt-file/*.gz | \
egrep '^(usr/bin/|sbin/|bin/)' | \
cut -f1 -d' ' | \
perl -pe 's/^(.*)\/(.*)$/$2/' | \
sort | uniq > used_names.txt

Here is the resulting list: used_names.txt.

more: used_names.txt

linkdump

What Is American Cheese, Anyway? | Serious Eats

History tells us what may happen next with Brexit & Trump — Medium — I share similar suspicions about this historical moment, though I'm not sure I find this all that well-argued.

Behavioral activation - Wikipedia, the free encyclopedia — This is a concept I am interested in knowing about; it is not that great of a Wikipedia article as it stands.

OpenPGP Best Practices - help.riseup.net

‘Hope is a​n embrace of the unknown​’: Rebecca Solnit on living in dark times | Books | The Guardian

List of unmade episodes of The X-Files - Wikipedia, the free encyclopedia

Crampton | MetaFilter — "In 1998, cult horror author Thomas Ligotti and coworker Brandon Trenz wrote a script for an episode of The X-Files which draws more on Ligotti's style and sentiment than on Kolchalk and flying saucers."

Our Incredible Journey — An ongoing blog of startup / service failure and acquihire notices.

Perrey - Kingsley - The In Sound From Way Out! (1966) FULL ALBUM - YouTube

The L.E.D. Quandary: Why There’s No Such Thing as “Built to Last” - The New Yorker

Elvis Presley Shreds - YouTube

NBA Players Swatting Little Kids' Shots - YouTube — Pure art.

Seamless Responsive Photo Grid | CSS-Tricks

ExifTool by Phil Harvey — Among other things, this can rename photo files by EXIF values like date taken, camera model, etc.

How To Package Your Python Code — Python Packaging Tutorial

Digital Apollo

Mise en abyme - Wikipedia, the free encyclopedia

stdgif — Standard output for gifs.

Boulder OEM Incident Map for Cold Springs Fire

Defensible Space - Colorado State Forest Service

VirtualBox - Debian Wiki

How to Fix Mouse Cursor Disappearing in Linux (gnome-settings-daemon) | Benjamin Kaiser — "Open dconf-editor and navigate to: org/gnome/settings-daemon/plugins/cursor and set 'active' to false (un-ticked)."

Debian Manual - 6.4. Loading Missing Firmware

configuring xterm

Why did ancient Egypt spend 3000 years playing a game nobody else liked? • Eurogamer.net