From 8d2f5c9a415c693f9f5b1282993bf9b60adec46e Mon Sep 17 00:00:00 2001 From: Harvie Date: Thu, 3 Jun 2010 20:17:58 +0200 Subject: [PATCH] Added script to find files not owned by pacman package manager (ArchLinux) --- bash/pacorphans.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 bash/pacorphans.sh 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 -- 2.30.2