On Wed, Sep 28, 2011 at 08:45:33PM +0100, Lisi wrote: > Hi! > > I am wanting to install the Wireshark tarball, preparatory to which I ran > aptitude purge to clear the deb out, together with its config files. I then > ran locate to find any files left so that I could remove them manually. I > got this: > > Tux:/home/lisi# locate wireshark > /etc/wireshark <snip> > What would be a sensible way of proceding from here? Manually delete them > one > by one? Or is there a simpler (=quicker) way??
More than one. for f in $( locate wireshark ); do if [ -f $f ]; then echo $f is a file; #rm $f; elif [ -d $f ]; then echo $f is a directory; #rm -f $f; else echo $f not dealt with. fi done Remove the comment marks (#) when you're sure you've got it right. find / -type f -name '*wireshark*' -exec rm {}\; find / -type d -name '*wireshark*' -exec rmdir {}\; This latter pair are problematic unless you first run without the -exec ... and are sure you're only removing things you don't want. G'luck, Mike -- Satisfied user of Linux since 1997. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110928233019.GA22142@playground