Browse Source

fragments: used_names.sh

master
Brennen Bearnes 1 year ago
parent
commit
bdccf7ce1a
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      home/fragments/used-names/used_names.sh

+ 16
- 0
home/fragments/used-names/used_names.sh View File

@ -0,0 +1,16 @@
#!/bin/sh
# Generate a list of used binary names in Debian.
# There is definitely a better way to go about this.
# Make sure we've got apt-file and lz4 compression utils:
sudo apt install apt-file lz4
sudo apt-file update
cd /var/lib/apt/lists || exit 1
lz4cat ./*.lz4 | \
grep -E '^(usr/bin/|sbin/|bin/|usr/games)' | \
cut -f1 -d' ' | \
perl -pe 's/^(.*)\/(.*)$/$2/' | \
sort | uniq > ~/used_names.txt

Loading…
Cancel
Save