Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Script] Manuell installierte Dateien herausfinden
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Wed Oct 25, 2006 1:49 pm    Post subject: [Script] Manuell installierte Dateien herausfinden Reply with quote

Hi!

Ich hab ab und zu mal etwas an Portage vorbei installiert. Also manuell mit make; make install.
Mittlerweile glaub ich sogar, dass dadurch beryl beeinträchtigt ist. Das ist aber Nebensache.

Nun will ich alle Dateien herausfinden, die nicht zu den installierten Paketen gehören.

Code:
#!/bin/bash

## alte Dateien löschen

rm /tmp/datei-wopkg
rm /tmp/datei-komp




## Start

/bin/ls /var/db/pkg/*/*/*.ebuild  |sed s'#/var/db/pkg/##'|gawk -F / {'print $1  echo "/"  $2'}| sed s'#^#=#'  > /tmp/pliste


## Dateien sammeln (aus Paketen) --> /tmp/datei-komp

cat /tmp/pliste|while read line; do

echo "$line"

equery f "$line" >> /tmp/datei-komp

cat /tmp/datei-komp|wc

done


## Dateien sammeln (Gesamt) --> /tmp/d1

/usr/bin/find / > /tmp/d1


## Dateien (gesamt) filtern --> /tmp/liste-komp

cat /tmp/d1|egrep -v "^/dev/|^/home/|^/daten*/|^/filme*/|^/media/|^/mnt/|^/tmp/|^/windows/|^/etc/|^/sys/|^/var/db/pkg/|^/var/tmp/|^/var/cache/|^/usr/src/" > /tmp/liste-komp


## Vergleich Gesamt <--> Pakete --> /tmp/datei-wopkg

cat /tmp/liste-komp|while read line; do

echo "$line"
if [ `/bin/grep -L "$line" /tmp/datei-komp` ]
        then
        echo "$line" >> /tmp/datei-wopkg
fi

done


Bei "Dateien filtern" muss man halt noch angeben, welche Verzeichnisse außen vor gelassen werden sollen.

Gibt bei mir sowas:
System 600.000 Dateien
Weg ~4.000 Dateien

/usr/lib/kde.3.x sind halt sehr viele Dateien.

Also, wenn ihr mögt, testet es mal.

Achja, muss als root ausgeführt werden, sonst macht der find / - Teil arge Probleme.

Tobi
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Wed Oct 25, 2006 8:32 pm    Post subject: Reply with quote

Ich werd es nicht testen, da ich keine Programme ohne Portage installiert habe. Aber es sieht gut aus, ich würde empfehlen, dieses Thread in Deutsche Dokumentation zu verschieben.

Gruss
Pablo
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Finswimmer
Bodhisattva
Bodhisattva


Joined: 02 Sep 2004
Posts: 5467
Location: Langen (Hessen), Germany

PostPosted: Thu Oct 26, 2006 5:02 am    Post subject: Reply with quote

Theoretisch kannst du es trotzdem mal testen.
Bei mir fand ich heraus, dass ich /usr/kde/3.x noch drauf habe.

Und da kann alles außer 3.5 weg.


Tobi
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu Oct 26, 2006 12:43 pm    Post subject: Reply with quote

Ich mach's, wenn ich mal Zeit hab ;)

Gruss
Pablo
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum