find the count of messages in Postfix’s mailq
You can pipe the output of mailq through various other filters but simply you can do this # mailq | tail -1 or this mailq | grep -c “^[A-Z0-9]”
You can pipe the output of mailq through various other filters but simply you can do this # mailq | tail -1 or this mailq | grep -c “^[A-Z0-9]”
FTP hangs or throws these error after a successful login. Vsftp – ftp: connect: No route to host This is because the FTP-data port is blocked by a firewall. 1. Make sure that passive mode is enabled (vsftp enables it by default). Check the file /etc/vsftpd/vsftpd.conf, for the following lines pasv_enable=YES 2. Also check whether […]
I really like to use this as the bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. while [ condition ] do command1 done i run this loop to show my EXIM mailq count every minute while true; do date && echo […]
method 1: Temp: on boot from GRUB Menu selecy kernel line and press e then add fast boot at the end of the line , press ENTER and Press b to boot Permanent: /boot/grub/grub.conf Find kernel line and put fastboot at the end of the kernel line. In the end it should look as follow: kernel […]
You can cd to /var/spool/mqueue and delete all files if you want to get rid of all messages in the queue: # cd /var/spool/mqueue/ # ls # rm *
Command 10 = 10 seconds interval #iostat 10 Result avg-cpu: %user %nice %system %iowait %steal %idle 0.55 0.00 0.03 0.21 0.00 99.22 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 15.27 0.16 162.70 1787038 1770815888
If you need to configure a linux in different network with different gteway this howto is for you. I present you a solution to do the multi default gateway under linux based on iproute2 commande line. Schema example : Step 1 : Creation of the table definition in iproute2: root# cat /etc/iproute2/rt_tables # reserved values […]
To print all the files from 19-10-2007 to 21-11-2007 $ find . -type f -exec ls -l –time-style=full-iso {} \; | awk ‘{print $6,$NF}’ | awk ‘{gsub(/-/,””,$1);print}’ | awk ‘$1>= 20071019 && $1<= 20071121 {print $2}’ and you can combined it with CP to find and copy files
Mac OS X 10.0 through latest The default account when composing a new message in Mail is the one listed first in the Description column of Mail Preferences. To change this default, you only need to change the order of the names. Follow these steps: 1. Choose Mail > Preferences. 2. Click Accounts. […]
First open squid.conf file /etc/squid/squid.conf: # vi /etc/squid/squid.conf Now add following lines to your squid ACL section: acl blockfiles urlpath_regex “/etc/squid/multimedia.files.acl” Now create the the file # vi /etc/squid/multimedia.files.acl \.[Ee][Xx][Ee]$ \.[Aa][Vv][Ii]$ \.[Mm][Pp][Gg]$ \.[Mm][Pp][Ee][Gg]$ \.[Mm][Pp]3$ Save and close the file and Restart Squid: # /etc/init.d/squid restart Courtesy: http://linuxpoison.blogspot.tw/2007/10/block-mp3-mpg-mpeg-exe-files-using.html but Cybercity blog goes one step further […]