Wednesday, November 29, 2006

Disabling email notifications in Linux

In Fedora, to disable the "sendmail" service,
service sendmail stop

will suffice. But, sometimes, when you open your shell, or at other times, you may get "you have new mail in /root/***". How to deal with this. For bash, you can do the following steps. To confirm that ur shell is bash:

echo $SHELL
will confirm your shell. If the notifications are alive, then
echo $MAILCHECK
would dump some data. Just type
unset MAILCHECK
After this, the previous command should dump nothing. You are thus freed of your burning mail issue. Amen.

Tuesday, November 21, 2006

restarting bash

There came a situation wherein I had updated the bashrc file and wanted to apply the effects to current shell without restarting it. Then I ended on the "source" command. On Mac, I had to type
source /etc/bashrc
while in linux its
source .bashrc
. It ended up applying the configuration to the current shell. Similarly, for applying profile specific datas (more like the autoexec.bat file in mac), I had to modify /etc/profile file for setting up PATH and other enrivonmental variables.

Wednesday, November 15, 2006

rpm query

rpm -q --queryformat '%{NAME}: %{FILENAMES} install:=%{DIRNAMES} - %{SUMMARY}\n' git-core-1.4.3.5-1

git-core: /usr/bin/git install:=/usr/bin/ - Core git tools

Friday, November 03, 2006

Bye bye smbfs

From Fedora Core 5, ( I dont know about others as of now), they have stopped supporting "smbfs" and expects the users to replace it with "cifs". Hence, if you need to mount a network driver,
mount -t cifs //server_name/to_be_mounted /mapping/directory 
-o username=myname,workgroup=mydomain
Also, it (mount) doesn't like SMB names. You have to give it IP address or DNS hostname. Happy linking !!!

Thursday, November 02, 2006

File format issue

I was trying to execute a shell script which I moved from windows. I repeatedly got the following error
: bad interpreter: No such file or directory

Although I had set the proper shell to the script in, I couldnt get it to run. The high point was the same set of commands executed without any hitch when run on commandline. Then, archamedically, the thought of "file format" struck me. I set

set ff=unix
and then tried executing it. Voila, it ran. It saved the day (atleast for now).