# If you ever want to uninstall lsof, or clean up files from an old
# version before installing a new one, skip down to the bottom for
# instructions
cd
test -f installed/lsof_4.82.tar.bz2 && mv installed/lsof_4.82.tar.bz2 .
test ! -f lsof_4.82.tar.bz2 &&
wget ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.82.tar.bz2
# Verify tarball w/ sha1sum:
# (this one came from my gpg-verified tarball)
echo "200aaf7494bddab4c47eea2466c65e57ef2f3786 lsof_4.82.tar.bz2" | \
sha1sum -c
tar xvf lsof_4.82_src.tar
test $UID = 0 && chown -R root:root .
chmod -R u+w .
cd lsof_4.82_src
./Configure -n linux
make
# Run tests to make sure everything is working OK
# (make test = standard tests, make opt = optional tests)
( cd tests ; make test )
( cd tests ; make opt )
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg lsof
# If you ever want to uninstall lsof, this should do it:
cd
su
for pfx in /usr /usr/local;
do
rm -f ${pfx}/bin/lsof ${pfx}/man/man8/lsof.8 \
${pfx}/man/cat8/lsof.8.* ${pfx}/share/man/cat8/lsof.8.* \
/usr/X11/man/cat8/lsof.8.*
done
exit
find ~/src -maxdepth 1 -type d -name "lsof-*" -exec rm -r {} \;
rm -f ~/installed/lsof-*.tar.*