Rabu, 17 Desember 2008

MCPAN

Perintahnya :
perl -MCPAN -e shell

Kalau mau update tanpa test :
cpan> notest install Mail::SpamAssassin

Selasa, 16 Desember 2008

ALTQ : pfctl: DIOCADDALTQ: Cannot allocate memory

ALTQ : pfctl: DIOCADDALTQ: Cannot allocate memory

coba cek kembali
/usr/include/altq/altq_hfsc.h
/usr/src/sbin/pfctl/missing/altq/altq_hfsc.h
/usr/src/sys/contrib/altq/altq/altq_hfsc.h
Tinggal ubah #define HFSC_MAX_CLASSES 64 misalnya :
#define HFSC_MAX_CLASSES 1024

dan recompile kernel.

Senin, 15 Desember 2008

Perintah2 ginian juga perlu ditulis biar ndak lupa :)

ls -l [dir] | wc -l  -> buat list jumlah file
find [dir] -name '*.*' |xargs rm -> buat delete huge file, bisa ditambah -atime n (n=1 -> 24 jam sampai saat ini)

Delete queue di mail queue ----biar ndak lupa yah--- :) :

mailq | tail +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($8 == "user@example.com" && $9 == "") print $1 }' | tr -d '*!' | postsuper -d -
# $7=sender, $8=recipient1, $9=recipient2

Jumat, 12 Desember 2008

How to build locate command database in FreeBSD?

If the database has not been built, locate command will show the following error message:
locate: database too small: /var/db/locate.database
You can build/update the database by running ‘locate.updatedb‘ script.
run:$ /usr/libexec/locate.updatedb