You are not logged in.
Thanks guys
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
with the version of spider.007, i added /var/tmp to the filtered paths
Offline
with the version of spider.007, i added /var/tmp to the filtered paths
Of course you need to adjust that list to fit your configuration...
Offline
The temporary directory handling is not very safe! Use:
TMPDIR=`mktemp -d`
if [[ -z $TMPDIR ]] ; then
echo "Could not create temporary directory." >&2
exit 1
fi
And the end of the code should be:
# Clean up
[[ -n $TMPDIR ]] && rm $TMPDIR/{full,owned,owned_full} && rmdir $TMPDIR
exit 0
Let's reduce the risk of recursively deleting all our precious files
Offline
Any update on this? The link to the script is dead
It was gone for 1 day, my server got a new IP address
Offline
It is looking good - brebs additions chages would be good.... As I said near the start of the thread, want to submit it to the pacman-dev list for inclusion in the pacman-contrib package?
Online
The removal process is now a bit better; I will submit it to the pacman-dev list for possible inclusion in the pacman-contrib package
Offline
Is there any update on this?
Is it still safe to use?
Acer Aspire V5-573P Antergos KDE
Offline
Safe? This script (whichever version you'll use) just *prints* a list of files. What can be unsafe about that?
Of course, when you decide to delete some of those, you should know what you're deleting. But that's up to your own decision.
Offline
and what would you like to see updated?
By the way; my message to the mailinglist seems to got lost in /dev/null; no responses at all? How to get this script included in pacman-contrib?
Last edited by Spider.007 (2008-05-30 07:45:29)
Offline
By the way; my message to the mailinglist seems to got lost in /dev/null; no responses at all? How to get this script included in pacman-contrib?
Which mailing list did you send it to? I don't remember seeing it and can't find it in the archives, so maybe it really did go to /dev/null!
Anyway, I have this on my list of scripts to add to pacman-contrib. The best way to get it included is to send it inline to the pacman-dev mailing list where the pacman devs will probably make some additional comments before it is included.
Online
is there any update on this?
Acer Aspire V5-573P Antergos KDE
Offline
The script never actually made it to the pacman-dev list so has not been included in contrib yet.
Online
The script never actually made it to the pacman-dev list so has not been included in contrib yet.
Do you think it will get added to the pacman-dev list?
Acer Aspire V5-573P Antergos KDE
Offline
Allan wrote:The script never actually made it to the pacman-dev list so has not been included in contrib yet.
Do you think it will get added to the pacman-dev list?
I think you misunderstood. pacman-dev is a mailing list were scripts can be sent for inclusion in contrib section of pacman (which is where the pacman-contrib package comes from).
Online
Oh great thread, here is my version!
#!/bin/bash
IGNORE="^/lib/modules|^/usr/local|^/usr/src|^/usr/share/mime|^/usr/share/texmf-var"
SEARCH="/bin /etc /lib /opt /sbin /usr"
# search for regular files
comm -2 -3 <(find $SEARCH -type f | sort -u | egrep -v $IGNORE) <(pacman -Qlq | awk '$2 !~ "/$" {print $2}' | sort -u)
# search for symlinks
# comm -2 -3 <(find $SEARCH -type l | sort -u | egrep -v $IGNORE) <(pacman -Qlq | awk '$2 !~ "/$" {print $2}' | sort -u)
Offline
Really nice thread, Here I came up with an one linear command which does exactly want I want.
alias pacman-disowned="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/srv' -o -path '/proc' -o -path '/home' -o -path '/root' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
then, pacman-disowned will do.
Last edited by techlive (2013-11-06 10:45:46)
Offline
HERE are two revised one linear scripts.
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