Friday, August 14, 2009

doctype.com

http://doctype.com : A new discussion from stackoverflow.com

Monday, August 10, 2009

English to Sinhala and Tamil Online Dictionary from Sri Lanka

English to Sinhala and Tamil Online Dictionary from Sri Lanka

Nice tool to get exact translation of english words in tamil.

They pronounce the word too.

They also translate in Sinhalese.

Thursday, June 25, 2009

Associating application with file types in Linux konsole

Use the command "Complete" to associate applications with the filte types.

For example, We can set, javac command will list only java files on pressing tab key.

You are going to compile a java file(Begin.java) inside a directory named 'training', but the directory training contains some .class, .txt, and .conf files.

If you try to compile Begin.java using, javac , it will shows other file extensions also, to avoid this, you can associate the filetype .java to an application javac.

like wise, we can set for the below filetypes and applications.
gedit - .txt
java - .class
kview - .png,.jpg

Syntax:

complete -G '*.java' javac
complete -G '*.txt' gedit
complete -G '*.png' kview
complete -G '*.class" java


To list all the combinations:

Typing the command complete will list the added combinations.

complete associations last only for the current bash session. If you exit and open a console, javac will no longer be associated with .java files. You need to associate file types to applications each time you start a new console session.

For permanent associations, you need to add the command to one of the bash startup scripts, such as ~/.bashrc. Then, whenever you are at the console, javac will be associated with .java files.


To revert: (complete -r )
eg. complete -r javac

to remove all complete, type complete -r

Tuesday, December 30, 2008

alias

usage of alias in konsole

Alias in linux konsole make the users to work faster.

alias - we can create shortcuts for linux commands using the alias.

"aliases for commands" should be declared in the .bashrc file which located under the $HOME directory

Syntax :

alias mv='mv -iv'
alias cp='cp -v'
alias rm='rm -v'
alias p='pwd'
alias c='clear'
alias cmo='chmod 755 *.bin;./*.bin'
alias l='ls'
alias c='clear'
alias f='find . -iname '
alias rmlog='cd /home/nobody/server/logs;rm -f *.log'
alias stserver='c;rmlog; cd /home/nobody/server/bin; sh run.sh'


Semicolon ";" is the command seperator in linux, so we can set a key for mulitple commands seperated by semicolon

Even we can execute shell scripts using alias.

We can use our previous aliases in the further aliases. Here i had declared an alias name rmlog which will delete the .log files under logs directory.
I had used the key in another alias named stserver to start a server after cleaning older logs.

FAQ.
* All the aliases gets set when a konsole is initialized.
* If you want to use the newly added aliases in the older window, just execute the below command .$HOME/.bashrc , this will set all the aliases in the older konsole
* typing alias on the konsole will list all the available aliases.
* If you want to set the alias for temporary purpose, then set the alias in the konsole itself using the same way as above. But this will not be available on other konsoles.

usage of alias in konsole

Alias in linux konsole make the users to work faster.

alias - we can create shortcuts for linux commands using the alias.

aliases should be declared in the .bashrc file which located under the $HOME directory

Syntax :

alias mv='mv -iv'
alias cp='cp -v'
alias rm='rm -v'
alias c='clear'
alias l='ls'
alias c='clear'

To remove log files
rmlog='rm -f /home/nobody/server/logs/*'
Shorter find command
alias f='find . -iname '
To start a server after clearing some log files
alias stserver='c;rmlog; cd /home/nobody/server/bin; sh run.sh'


Semicolon ";" is the command seperator in linux, so we can set a key for mulitple commands seperated by semicolon

Even we can execute shell scripts using alias.

We can use our re-use aliases. Here i had declared an alias name rmlog which will delete the log files under logs directory.
I had used the key in another alias named stserver to start a server after cleaning older logs.

FAQ.
* All the aliases gets set when a konsole is initialized.
* If you want to use the newly added aliases in the older window, just execute the below command .$HOME/.bashrc , this will set all the aliases in the older konsole
* typing alias on the konsole will list all the available aliases.
* If you want to set the alias for temporary purpose, then set the alias in the konsole itself using the same way as above. But this will not be available on other konsoles.

Tuesday, October 16, 2007

Remote login from linux

Hi,

We can view and work windows machine remotely from linux through rdesktop.

This can be done by the command rdesktop.

Remote desktop is commonly available in Windows XP machine. The same concept is available in Mandriva linux 2007.

The command is redesktop .

This is much faster than VNC Viewer.

Download and install the rpm rdesktop-1.5.0-1mdv2007.1 on your linux box to get this command work.

The best RPM Search engine is http://rpm.pbone.net, this will be useful to download the rpm.

Thanks,
Prasanna