From: Harvie Date: Thu, 3 Jun 2010 18:17:58 +0000 (+0200) Subject: Added script to find files not owned by pacman package manager (ArchLinux) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8d2f5c9a415c693f9f5b1282993bf9b60adec46e;p=mirrors%2FPrograms.git Added script to find files not owned by pacman package manager (ArchLinux) --- diff --git a/bash/pacorphans.sh b/bash/pacorphans.sh new file mode 100755 index 0000000..1db7382 --- /dev/null +++ b/bash/pacorphans.sh @@ -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