Monday, February 16, 2009

To find files or directory recursively and delete it

To find files or directory recursively and delete it

Some times I do have need to find some file or directory which I need to delete .
I use the "find " and "exec" command

find . -name "CVS" -type d -exec rm -rf {} // for directory named CVS

find . -name "CVS" -type f -exec rm -rf {} // for file named CVS


The -exec operator execute any command. When using after "find" command it needs some way to distinguish the command it's executing from its own arguments. For this purpose u need to use the same end -of - command character as the shell(semicolon) . But since the shell uses the semicolon utself, it is necessary to escape the character with a backslah or quotes

or
we could use
find . -name "CVS" -type d | xargs rm -rf

Here "xargs" executes its commands and reads standard input to specify arguments to that command

Saturday, February 14, 2009

To read Malayalam sites :- Manorama and Deepika

To read manoromaonline


1> Download the font from http://www.manoramaonline.com/mmfont/Manorama.ttf
2> In the user home dir create a dir named ".fonts"
3> copy the Manorama.ttf to $user/.fonts
The font will be installed once you reboot. But if you don’t want to do that open your terminal.
4> sudo fc-cache -fv


To read deepika

1> Download the font from http://www.deepika.com/mlkr0ntt_TTF.ttf
2> Save it to $user/.fonts
The font will be installed once you reboot. But if you don’t want to do that open your terminal.
3> sudo fc-cache -fv