Monday, May 26, 2014

Rocks cluster cannot ssh to nodes with root account

If you accidentally deleted /root/.ssh directory, the automatic ssh key generator doesn't produce the right permission for all files. This causes a problem to ssh to nodes. In rocks cluster, the root account nodes have a different password (no one knows what it is exactly, since it is never generated or used).

You have to check the right permission :
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts

Wednesday, June 12, 2013

Linux find and remove

find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;

Monday, April 15, 2013

Install Sun Grid Engine on ubuntu

http://webappl.blogspot.com/2011/05/install-sun-grid-engine-sge-on-ubuntu.html

Monday, March 18, 2013

remove old linux kernel in ubuntu

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y remove

Thursday, May 31, 2012

To make Emacs recognize cuda (.cu) files in c++ mode

Much simpler to just put following in your .emacs file: (add-to-list 'auto-mode-alist '("\\.cu$" . c++-mode)) Or alternatively, on a per .cu file basis, you could say just put following in the first line of your .cu files: // -*- c++ -*-

Wednesday, August 19, 2009

Disable the annoying bell sound in bash

In bash, it's common to take the advantage of the "Tab" key helping you to auto-complete the command. Somehow, it will create annoying bell-sound when there are many matches and ...

So, how to disable it. Edit your ~/.inputrc, put something like
set bell-style none
Restart bash, no sound any more!

This applies to bash in both Linux and Mac OS X.

Wednesday, July 8, 2009

Emacs common commands

Search and Replace:
M-x then replace-string RET your_search_string RET your_replace_string