Browse Source

fragments: used_names.sh

Brennen Bearnes 2 months 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 @@
1
+#!/bin/sh
2
+
3
+# Generate a list of used binary names in Debian.
4
+
5
+# There is definitely a better way to go about this.
6
+
7
+# Make sure we've got apt-file and lz4 compression utils:
8
+sudo apt install apt-file lz4
9
+sudo apt-file update
10
+
11
+cd /var/lib/apt/lists || exit 1
12
+lz4cat ./*.lz4 | \
13
+  grep -E '^(usr/bin/|sbin/|bin/|usr/games)' | \
14
+  cut -f1 -d' ' | \
15
+  perl -pe 's/^(.*)\/(.*)$/$2/' | \
16
+  sort | uniq > ~/used_names.txt

Loading…
Cancel
Save