Category Archives: Linux

Linux commands and simple HowTos

Linux Emergency Reboot / Shutdown

echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger The first line is for enabling SysRq, and the second one is for rebooting. More info HERE. echo 0 > /proc/sysrq-trigger if you need to shutdown instead of rebooting

Posted in Linux | Leave a comment

Force CentOS 6 to Re-Detect Network Devices

Edit the interface that “doesn’t seem to be present”: vi /etc/sysconfig/network-scripts/ifcfg-eth0 and remove the HWADDR line. Remove the old 70-persistnet-net.rules file: rm  /etc/udev/rules.d/70-persistent-net.rules Removing this file will force udev to probe for network interfaces at boot and create a new … Continue reading

Posted in Linux | Leave a comment

Bypass amavisd-new scanning – Postfix integration

Bypass amavisd-new scanning – Postfix integration There is a disclaimer for this document located at http://www200.pair.com/mecham/spam/. This ‘How do I bypass amavisd-new?’ topic comes up often on both the Postfix and the amavisd-new mailing lists. While it appears there should … Continue reading

Posted in Linux | Tagged | Leave a comment

Postfix – force send/requeue deferred message

Find the QUEUE-ID number and run: find /var/spool/postfix/deferred/ -name 518A89B30 -exec stat {} \; File: `/var/spool/postfix/deferred/5/518A89B30′ Size: 59246         Blocks: 120        IO Block: 4096   regular file Device: fd01h/64769d    Inode: 39728       Links: 1 Access: (0700/-rwx——)  Uid: (   89/ postfix)   Gid: (   … Continue reading

Posted in Linux | Tagged | Leave a comment

KVM rename Virtual Machine ( virsh undefine/define )

virsh dumpxml $DOMAIN > New_Domain.xml virsh undefine $DOMAIN <edit New_Domain.xml> virsh define New_Domain.xml

Posted in Linux | Tagged | Leave a comment

Compare local directory with remote directory

diff  <(ls -R /home/samba) <(ssh root@10.0.0.10 ls -R /home/samba)

Posted in Linux | Leave a comment

Missing X-Spam Flags in Message Headers!

If you’re using amavisd – edit the following lines in /etc/amavisd.conf: @local_domains_maps = ( [“.”] ); $sa_tag_level_deflt  = -9999;    

Posted in Linux | Leave a comment

Linux top command

a: PID — Process Id The task’s unique process ID, which periodically wraps, though never restarting at zero. b: PPID — Parent Process Pid The process ID of a task’s parent. c: RUSER — Real User Name The real user … Continue reading

Posted in Linux | Leave a comment

top command – VIRT, RES, and SHR explained

VIRT stands for the virtual size of a process, which is the sum of memory it is actually using, memory it has mapped into itself (for instance the video card’s RAM for the X server), files on disk that have … Continue reading

Posted in Linux | Leave a comment

Yum – update all except kernel

yum –exclude=kernel* update or add exclude=kernel* in /etc/yum.conf

Posted in Linux | Leave a comment