Added script to find files not owned by pacman package manager (ArchLinux)
authorHarvie <tomas@mudrunka.cz>
Thu, 3 Jun 2010 18:17:58 +0000 (20:17 +0200)
committerHarvie <tomas@mudrunka.cz>
Thu, 3 Jun 2010 18:17:58 +0000 (20:17 +0200)
bash/pacorphans.sh [new file with mode: 0755]

diff --git a/bash/pacorphans.sh b/bash/pacorphans.sh
new file mode 100755 (executable)
index 0000000..1db7382
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+time /usr/bin/pacman -Ql | cut -d ' ' -f 2- | sort -u > db.txt
+time find /arch /bin /boot /etc /lib /opt /sbin /usr 2>/dev/null | while read i; do
+       if [ ! -d "$i" ]; then
+               echo "$i"
+       fi;
+done | sort -u > fs.txt
+time comm -23 fs.txt db.txt > non-db.txt
+
+#test it:
+#cat non-db.txt | while read i; do pacman -Qo "$i" 2>&1; done | tee test.txt
This page took 0.091476 seconds and 4 git commands to generate.