You are not logged in.
I sometimes install files without using pacman. For example, I did use python installer, or just copy pasted some files into /bin etc. I know I can use find and get list of all files, and make a pacman -Qo for each, but it takes a lot of time to query each file seperately . Is there a better way that I can use to get a list of files that are not tracked by pacman?
Last edited by yasar11732 (2012-05-17 03:50:32)
Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.
Offline
Offline
#!/bin/sh
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
db=$tmp/db
fs=$tmp/fs
mkdir "$tmp"
trap 'rm -rf "$tmp"' EXIT
pacman -Qlq | sort -u > "$db"
find /bin /etc /lib /sbin /usr \
! -name lost+found \
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
comm -23 "$fs" "$db"|less
...I forget where I got that code.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Thanks a lot.
Yo Dawg, I heard you likes patches, so I have created a patch for your patch, so you can patch your patches before you patch.
Offline
yasar11732, please read the wiki before posting:
https://wiki.archlinux.org/index.php/Pa … ny_package
Last edited by rwd (2012-05-18 11:31:50)
Offline
HERE are two one linear scripts that will do the job.
Show dirs that don't belong to any package:
alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
Show files that don't belong to any package:
alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
Offline
techlive, IMHO adding them to the wiki is enough, you don't have to bump old threads.
Offline
See lostfiles in the AUR.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline