# killall -9 X

The Archives

I frequently need to compare two directories (with similar structures) to find different or new files. When I have to compare them locally, I use the diff command.
$ ls test*
test:
file1 file2 file3 file4 file5
test.new:
file1 file2 file3 file4 file5 file6
$ diff -qr test test.new
Files test/file2 and test.new/file2 differ
Files test/file4 and test.new/file4 differ
Only in test.new: file6
The -q option tells diff to tell only whether the files differ and the -r option is for recursively comparing inside subdirectories.
A more complicated problem arises when the comparation has to be done remotely, that is one of the directories is in another host (Samba, NFS, etc ...

portsclean cleans garbage from the directory tree of the ports collection. It is a utility of the base system that should be run from time to time to keep one's ports infrastructure as sane as possible.
portsclean wipes old package files, unneeded libraries and such. There are several interesting option flags described in the man page. This is how I run portsclean from time to time:
% portsclean -DD
The command above cleans all the distfiles that are not referenced by any installed package in the system. I usually run this after rebuilding the complete userland from a new ports fetch.
Enjoy!