Delete all messages in Postfix queue
Nov 14
for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done
Nov 14
for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done
Oct 25
Oct 25
Aug 13
Linux Linux, ubuntu server No Comments
sudo pico /etc/network/interfaces
If your device name is eth0, the configuration block should look like the following-
iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 208.67.222.222 208.67.220.220 127.0.0.1
If you wish to add another I.P. address, you can add a block similar to this-
iface eth0:1 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
All that is needed now is a restart of networking-
sudo /etc/init.d/networking restart
Jul 28
Linux Linux, mysql, server, ubuntu No Comments
If you ever need to downgrade from MySQL 5.x to MySQL 4.x (hope you don’t), chances are you are going to run into a problem with apt-get. You will most likely receive cryptic, unhelpful dpkg errors.
If this is the case, try the command below.
sudo aptitude purge mysql-common mysql-client mysql-server && sudo aptitude install mysql-server-4.1 mysql-client-4.1
This should purge whatever is left of the MySQL 5.x installation, and then install the MySQL 4.x version. If this fails, proceed to bang head against nearest hard object.
Jul 28
Linux Linux, swap, sysctl No Comments
Those of you with lots of RAM could benefit from this tweak. There is a value controlled by sysctl called “vm.swappiness”. This is a value from 0-100 which tells the system how aggressively to use the swap space on your system.
Setting this value to 0 will tell the system to avoid writing anything to swap if at all possible, and a value of 100 will have your system almost immediately write out your memory to a swap file.
The default on Ubuntu and most other Linux systems is 60. If you don’t have more than 1GB of RAM I would not recommend altering this value. On my workstations with 2GB of RAM or more I usually go 10 or 0.
To set the swappiness value:
sudo sysctl vm.swappiness=10
To make the change stick after reboots, edit /etc/sysctl.conf with your favorite editor, and add the line “vm.swappiness=10″ if it does not already exist.
Jul 22
Please make a version of your flash player for Linux that doesn’t totally blow. Thank you, that is all.
Since we’re on the subject, could we also move a little faster with the HTML5 + Ogg video?
Jul 20
Here’s a quick, dirty, and not 100% reliable command to tell you which IPs in a range are in use:
nmap -sP 192.168.1.1-254
The above example will scan the range of 192.168.1.1 – 192.168.1.254, and will give you a result something like this:
Host (192.168.1.1) appears to be up.
Host (192.168.1.2) appears to be up.
Host (192.168.1.14) appears to be up.
Jul 14
Linux corrupt, fix, innodb, mysql No Comments
If MySQL won’t start due to corrupt InnoDB tables, you can add
[mysqld]
innodb_force_recovery = 4
to the /etc/my.cnf file, and restart MySQL. This will allow MySQL to start even with the corrupt InnoDB tables. I’m not quite sure if this fixes the tables or merely allows MySQL to run despite the warnings.
Jul 14
Linux debian, dpkg, packages, ubuntu No Comments
This trick comes in real handy if you need to reinstall your Ubuntu/Debian system, or install your preferred software automatically with a fresh install.
From the system with your desired software:
dpkg --get-selections > mysoftwarelist.txt
To the reinstalled or fresh system:
dpkg --set-selections mysoftwarelist.txtsudo dselect