GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea0fdc0
)
Added script to find files not owned by pacman package manager (ArchLinux)
author
Harvie
<tomas@mudrunka.cz>
Thu, 3 Jun 2010 18:17:58 +0000
(20:17 +0200)
committer
Harvie
<tomas@mudrunka.cz>
Thu, 3 Jun 2010 18:17:58 +0000
(20:17 +0200)
bash/pacorphans.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/bash/pacorphans.sh
b/bash/pacorphans.sh
new file mode 100755
(executable)
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
This page took
0.156331 seconds
and
4
git commands to generate.