Search This Blog

Friday, February 27, 2009

Floating point comparison in linux script

[root@vikas ~]# echo 8.8 == 8.2 | bc
0
[root@vikas ~]# echo 8.8 == 8.8 | bc
1
[root@vikas ~]#


[root@vikas ~]# echo 8 == 2 | bc
0
[root@vikas ~]# echo 8 == 8 | bc
1
[root@vikas ~]#

Floating point comparison in linux script

[root@vikas ~]# echo 8.8 == 8.2 | bc
0
[root@vikas ~]# echo 8.8 == 8.8 | bc
1
[root@vikas ~]#


[root@vikas ~]# echo 8 == 2 | bc
0
[root@vikas ~]# echo 8 == 8 | bc
1
[root@vikas ~]#

How to use POSTGRESQL from terminal commnds (examples)

[All below are commands from terminal using the database SIPXCDR as user postgres (no password here) ]
psql --command "create sequence call_ip_id_seq;" SIPXCDR postgres
psql --command "create table call_ip(id bigint default nextval('call_ip_id_seq'),call_id text,from_url text,from_ip text,to_url text, to_ip text,method text, primary key(call_id,from_url,to_url,id));" SIPXCDR postgres
psql --command "alter table cdrs add column caller text;" SIPXCDR postgres
psql --command "alter table cdrs add column caller_ip text;" SIPXCDR postgres
psql --command "alter table cdrs add column callee text;" SIPXCDR postgres
psql --command "alter table cdrs add column callee_ip text;" SIPXCDR postgres
psql --command "create view view_cdrs_ip as SELECT cdrs.id, cdrs.caller, cdrs.caller_ip, cdrs.callee, cdrs.callee_ip, cdrs.start_time, cdrs.connect_time, cdrs.end_time, cdrs.end_time - cdrs.connect_time AS duration, cdrs.termination, cdrs.failure_status, cdrs.failure_reason, cdrs.call_direction FROM cdrs;" SIPXCDR postgres

How to use POSTGRESQL from terminal commnds (examples)

[All below are commands from terminal using the database SIPXCDR as user postgres (no password here) ]
psql --command "create sequence call_ip_id_seq;" SIPXCDR postgres
psql --command "create table call_ip(id bigint default nextval('call_ip_id_seq'),call_id text,from_url text,from_ip text,to_url text, to_ip text,method text, primary key(call_id,from_url,to_url,id));" SIPXCDR postgres
psql --command "alter table cdrs add column caller text;" SIPXCDR postgres
psql --command "alter table cdrs add column caller_ip text;" SIPXCDR postgres
psql --command "alter table cdrs add column callee text;" SIPXCDR postgres
psql --command "alter table cdrs add column callee_ip text;" SIPXCDR postgres
psql --command "create view view_cdrs_ip as SELECT cdrs.id, cdrs.caller, cdrs.caller_ip, cdrs.callee, cdrs.callee_ip, cdrs.start_time, cdrs.connect_time, cdrs.end_time, cdrs.end_time - cdrs.connect_time AS duration, cdrs.termination, cdrs.failure_status, cdrs.failure_reason, cdrs.call_direction FROM cdrs;" SIPXCDR postgres

Thursday, February 26, 2009

Touching story .....................

A man was polishing his new car; his 4 yr old son picked up a stone & scratched on the side of the car. In anger, the furious Man took his child's hand & hit it many times, not realizing he was using a wrench.

At the hospital, the child lost all his fingers due to multiple fractures. When the child saw his father....with painful eyes he asked 'Dad when will my fingers grow back?' The man was so hurt and speechless.

He went back to the car and kicked it many times. Devastated by his own actions... sitting in front of the car he looked at the scratches, His son had written 'LOVE YOU DAD'. Next day that man committed suicide...Anger and Love have no limits...

Always remember..... "Things are to be used and people are to be loved" but the problem in today's world is....

"People are being USED & Things are being LOVED"

Deleting a line from a file using sed

[Appending a line say sh /usr/bin/coraldatabase.sh]
[root@vikas Desktop]# echo "sh /usr/bin/coraldatabase.sh" >>' /root/.bashrc

[Deleting a line sh /usr/bin/coraldatabase.sh]
[root@vikas Desktop]# sed -i '/sh \/usr\/bin\/coraldatabase.sh/d' /root/.bashrc
[root@vikas Desktop]#

Deleting a line from a file using sed

[Appending a line say sh /usr/bin/coraldatabase.sh]
[root@vikas Desktop]# echo "sh /usr/bin/coraldatabase.sh" >>' /root/.bashrc

[Deleting a line sh /usr/bin/coraldatabase.sh]
[root@vikas Desktop]# sed -i '/sh \/usr\/bin\/coraldatabase.sh/d' /root/.bashrc
[root@vikas Desktop]#

A simple perl script variables, array, input, output and Reading a file in PERL

#!/usr/bin/perl
#
#output
print "********************\n";
print "First progarm in perl\n";
print "********************\n";

#variables
$var = "vikas";
print "\n$var\n";
$a=9;
$c=10;
$z=$a+$c;
print "\n$z\n";

#array
@nos = (1, 2, 3, 4, 5, 6);
push(@nos, 7);
print "\n@nos\n";
print @nos;
print "\n$nos[5]\n";

#inserting into array
push(@nos, 7);
print "\n@nos[6]\n";

#deleting from array
$arr=pop(@nos);
print "\nPoped -- $arr\n";

# length of array $#nos+1
$len = @nos;
print "\nlength -- $len and $#nos\n";
#array as string
$str = "@nos";
print "\narray as string -- $str\n";

#array
($a, $b) = ($c, $d); # Same as $a=$c; $b=$d;
($a, $b) = @nos; # $a and $b are the first two
# items of @nos.
($a, @oth) = @nos; # $a is the first item of @nos
# @oth is a list of the
# others.
(@oth, $a) = @nos; # @oth is @nos and
# $a is undefined.

#reading from terminal
# total numbers of command line args = $#ARGV + 1
# here is first command lin argument
print "\n $ARGV[0]\n";
print "\n $ARGV[1]\n";

# reading all arguments using for loop
foreach $args (0 .. $#ARGV) {
print "$ARGV[$args]\n";
}

#input from terminal
print "\nEnter var 1 ";
$s = ;
print "\nEnter var 2 ";
$r = ;
#trimmming the input
chomp $r;
chomp $s;
#printing the input
print "----$r----$s------\n";


#File handling

$file = '/root/Desktop/ist.pl'; # Name the file
open(INFO, $file); # Open the file
@lines = ; # Read it into an array
close(INFO); # Close the file
print @lines;


#printing multiple lines
print <<"END";
#####################
vikas
sharma
coral

END

A simple perl script variables, array, input, output and Reading a file in PERL

#!/usr/bin/perl
#
#output
print "********************\n";
print "First progarm in perl\n";
print "********************\n";

#variables
$var = "vikas";
print "\n$var\n";
$a=9;
$c=10;
$z=$a+$c;
print "\n$z\n";

#array
@nos = (1, 2, 3, 4, 5, 6);
push(@nos, 7);
print "\n@nos\n";
print @nos;
print "\n$nos[5]\n";

#inserting into array
push(@nos, 7);
print "\n@nos[6]\n";

#deleting from array
$arr=pop(@nos);
print "\nPoped -- $arr\n";

# length of array $#nos+1
$len = @nos;
print "\nlength -- $len and $#nos\n";
#array as string
$str = "@nos";
print "\narray as string -- $str\n";

#array
($a, $b) = ($c, $d); # Same as $a=$c; $b=$d;
($a, $b) = @nos; # $a and $b are the first two
# items of @nos.
($a, @oth) = @nos; # $a is the first item of @nos
# @oth is a list of the
# others.
(@oth, $a) = @nos; # @oth is @nos and
# $a is undefined.

#reading from terminal
# total numbers of command line args = $#ARGV + 1
# here is first command lin argument
print "\n $ARGV[0]\n";
print "\n $ARGV[1]\n";

# reading all arguments using for loop
foreach $args (0 .. $#ARGV) {
print "$ARGV[$args]\n";
}

#input from terminal
print "\nEnter var 1 ";
$s = ;
print "\nEnter var 2 ";
$r = ;
#trimmming the input
chomp $r;
chomp $s;
#printing the input
print "----$r----$s------\n";


#File handling

$file = '/root/Desktop/ist.pl'; # Name the file
open(INFO, $file); # Open the file
@lines = ; # Read it into an array
close(INFO); # Close the file
print @lines;


#printing multiple lines
print <<"END";
#####################
vikas
sharma
coral

END

Wednesday, February 25, 2009

AND and OR in IF statement in linux script

#var1
abc=0
# $1 is ist argument
echo -en "1st arg $1 and $abc\n"

# OR of two expr
if [ "$1" = "vikas" -o $abc -eq 1 ] ; then
echo "true"
else
echo "false"
fi

# AND of two expr
if [ "$1" = "vikas" -a $abc -eq 1 ] ; then
echo "true"
else
echo "false"
fi

AND and OR in IF statement in linux script

#var1
abc=0
# $1 is ist argument
echo -en "1st arg $1 and $abc\n"

# OR of two expr
if [ "$1" = "vikas" -o $abc -eq 1 ] ; then
echo "true"
else
echo "false"
fi

# AND of two expr
if [ "$1" = "vikas" -a $abc -eq 1 ] ; then
echo "true"
else
echo "false"
fi

Writing in crontab for scheduling from terminal

crontab -l > /tmp/file
echo "12 12 * * * sh /ascript.sh_path" >> /tmp/file
crontab /tmp/file
rm -f /tmp/file

By this your script is now ready to run according to the time scheduled

Writing in crontab for scheduling from terminal

crontab -l > /tmp/file
echo "12 12 * * * sh /ascript.sh_path" >> /tmp/file
crontab /tmp/file
rm -f /tmp/file

By this your script is now ready to run according to the time scheduled

SWEETS AT MY DESK!

Subha Utha , Nahaya ..Mast Deo Lagaya...

Usko Yaad Kiya Aur Muskuraya...



Muskurahat Ka Karan Tha , Kya Sapna Liya Tha Raat Ko

Main Company Ka Ceo Aur My Dream Girl Was My Pmo.



Mann To Kiyan So Jaon, Swapn Ki Duniya Mein Laut Jaun...

Phir Socha Uski Jhalak Paani Hain Office Mein, Kahin Late Na Ho Jaun...



Goggles Lagaya Style Mein, Sutta Niptaya,

Bike Kiya Self Start, Accelerater Maara



Pahooncha Office...Card Swipe Kara..

Khola Pc ...Lotus Notes Top Par Mail Uska Paaya...



Mailbox Dekh Sanatta Chaya..

Uska Mail Ka Subject Humien Na Bhaya..



Ek Baar Phir Kiya Mail Ka Subject Check

Oh No ..Not Again..Same Words..."Sweets At My Desk"



Darte Darte Khola Mail...Andar Wedding Invitation Paaya...

Lo Bhaiya Lut Gayee Duniya...Mandraya Kala Saaya...



Dukhi Mann Se Socha ...Chalo Ek Baar Contents To Padd Le..

Naam Kya Hai Ladke Ka...Details Se Rubaru To Ho Le...



Phir Ek Baar Mann Chakkar Khaya...Uska Naam Kahin Naa Paaya..

Mail Ka Phir Se Audit Kiya...Dil Ko Ncr Report Acha Aaya...



Mail Ke Subject Se Achi Mail Ke Body Nikli..

Jiski Shaadi Thi ..Woh To Uski Sister Nikli...



Bhujti Hui Low Phir Phadphadai...

Ek Umeed Jaagi..Asha Ki Ek Kiran Nazar Aayee.



Josh Bhare Kadmon Se Rukh Kiya Uske Cubicle Ki Aur...

Ab Sirf Uskee Jhalak Nahin ..Yeh Dil Maange More..



Aaj Tak Cubicle Ki Diwaron Se Dekha Tha Usko..

Dekhte Hi Usne Bola ..Lo Dear, Sweets Lo..



Humne Suna "Dear" , Humne Kaha Ab No Fear.

Kiya Jhuki Aankhon Se Usko Stare, Uthaya Sweets Ka Apna Share..



"Dear" Shabd Kitna Acha Lagne Laga Tha....

Uske Aur Mere Beech Ka Loc Ab Mitne Laga Tha...



Baton Hi Baton Mein Usko Bataya Mail Padke Hua Confusion Tha

Reply Jo Bataya Usne, Phir Se Chida Kargil Tha..



Phir Se Low Bhuj Gayee Thi, Umeed Mit Gayee Thi ....

Uski Sagai Ki Mail To Ek Hafte Pahle Bounce Back Ho Chuki Thi...



Maa Kasam Ek Hi Gaana Yaad Aa Raha Tha Cham Se...

Kasam Ki Kasam , Yeh Pyaar Na Hoga Ab Humse...



O Haseeno Sun Lo Meri Iltaaja,

Please Mat Hona Humse Khafa,

Kuch Bhi Ho Jaaye Ab Na Hoga Adjust,

Ab Mat Daalna Mail With Subject "Sweets At My Desk

I could fall in love with you

I Could Fall In Love
I could lose my heart tonight
If you don't turn and walk away
'Cause the way I feel I might
Lose control and let you stay
'Cause I could take you in my arms
And never let go

I could fall in love with you
I could fall in love with you

I could only wonder how
Touching you would make me feel
But if I take that chance right now
Tomorrow will you want me still
So I should keep this to myself
And never let you know

c with you
I could fall in love with you

And I know it's not right And I guess I should try
To do what I should do
But I could fall in love
Fall in love with you
I could fall in love with you

So I should keep this to myself
And never let you know

I could fall in love
I could fall in love...

with you

Tuesday, February 24, 2009

Setting, unsetting, using environmental variable in linux

[Setting a env variable]
export VIK=vikas
echo $USER

[using]
if [ ! $VIK ] ; then
echo "not defined"
else
echo $VIK
fi

[unsetting]
unset VIK

if [ $VIK ] ; then
echo $VIK
else
echo "not defined"
fi

Setting, unsetting, using environmental variable in linux

[Setting a env variable]
export VIK=vikas
echo $USER

[using]
if [ ! $VIK ] ; then
echo "not defined"
else
echo $VIK
fi

[unsetting]
unset VIK

if [ $VIK ] ; then
echo $VIK
else
echo "not defined"
fi

Saturday, February 21, 2009

Reference object e.g

[cow and dog class in the same package]

//reference of abstract

public class ref
{

public static void main(String[] ar)
{
cow c = new cow();
dog d = new dog();
//reference
animal a;
a=c;
a.makeNoise();
//reference
a=d;
a.makeNoise();
}
}

-----------------------------

//reference of abstract

class cow1 extends animal
{
public void makeNoise() { System.out.println ("cow1\n"); }
public static void main(String[] ar)
{
cow1 c = new cow1();
c.makeNoise();
c.eat();
}

}

public class ref1
{

public static void main(String[] ar)
{
cow1 c = new cow1();
// a is reference
animal a;
a=c;
a.makeNoise();

}

}

Basics of Abstract class

// abstract method can not have body
// abstarct method should be given body by the class which extends the abstract class
// abstarct class can not be instansiated and have at least on 1 abstract method or (class have abstract method must be declared abstract)
// use where some features are common like eat and sleep and some are not like makeNoise
// static abstract or constructor abstract must not be together
// reference can created ob abstract class


//interface I use interfaces when I see that something in my design will change frequently.

public abstract class animal
{
public void eat()
{
System.out.println ("eat\n");
makeNoise();
}

public void sleep()
{
System.out.println ("sleep\n");
}

public abstract void makeNoise();
//public abstract void makeNoise2();
}

-------------------------
//When you declare a method as abstract, can other nonabstract methods access it? yes

public class cow extends animal
{
public void makeNoise() { System.out.println ("cow\n"); }
public static void main(String[] ar)
{
cow c = new cow();
//c.makeNoise();
c.eat();
}

}

-------------------------------------
public class dog extends animal
{
public void makeNoise() { System.out.println ("dog\n"); }
public static void main(String[] ar)
{
dog d = new dog();
d.makeNoise();
}
}

----------------------------------------

Basics of Instance and class variables with e.g

/*
# nstance methods can access instance variables and instance methods directly.
# Instance methods can access class variables and class methods directly.
# Class methods can access class variables and class methods directly.
# Class methods cannot access instance variables or instance methods directly—they must use an object reference. Also, class methods cannot use the this keyword as there is no instance for this to refer to.
*/
/*
################################################
vik(), vik2(), x are static
vik1(), vik3(), y non-static
##################################################
*/
public class vars {
public static int x = 7; // class varibale
//public int y = 3;
private int y = 3; //instance variable

// a non-static can call only static not a non-static
// static fun can use only static varibales not non-static one
public static void vik() {
System.out.println("\n a static one \n"+ x);
vik2(); //static
//vik1(); non-static will give error
}

// a non-static can call both static or non-static fun and variables
public void vik1(){
System.out.println("\n not a static one \n " + x + y);
vik(); //static
vik3(); //non static
}

public static void vik2() {
System.out.println("\n a static one \n");
}

public void vik3(){
System.out.println("\n not a static one \n");
}


public static void main(String[] args) {
System.out.println(vars.x);
//System.out.println(vars.y);
//error non-static variable y cannot be referenced from a static context
//only static vars can use class name to access so called class variable

vars v = new vars();
System.out.println(v.y);
//vars.vik(); //or v.vik();
// vars.vik1();
//error non-static variable y cannot be referenced from a static context
v.vik1();
}
}

SElinux status

[root@vikas ~]# sestatus
SELinux status: disabled
[root@vikas ~]#

[change status]

[root@vikas ~]# vi /etc/selinux/config
Edit config file accordingly

SElinux status

[root@vikas ~]# sestatus
SELinux status: disabled
[root@vikas ~]#

[change status]

[root@vikas ~]# vi /etc/selinux/config
Edit config file accordingly

Java First program

/*
In general, class declarations can include these components, in order:

1. Modifiers such as public, private, and a number of others that you will encounter later.
2. The class name, with the initial letter capitalized by convention.
3. The name of the class's parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.
4. A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.
5. The class body, surrounded by braces, {}.


* public modifier—the field is accessible from all classes.
* private modifier—the field is accessible only within its own class.

*/


public class Notes {
static int x;
int k;

// constructor with 2 args
public Test( int n, int m ) {
x = n;
k = m;
}

public static void main(String[] args) {
Test t1 = new Test(10, 20);
Test t2 = new Test(30, 40);
System.out.print(t1.x + " ");
System.out.print(t1.k + " ");
System.out.print(t2.x + " ");
System.out.println(t2.k);
}
}

Thank you in various languages

Afrikaans (Southern Africa) Dankie
Afrikaans (Southern Africa) [very much] Baie dankie
Aguacateco (Huehuetenango Guatemala) Ntyox teru'
Aguaruna (Peru) Seé
Ahtna (Alaska) Tsin'aen
Ainu [Saru dialect] (Japan) [formal] Iyayraykere
Ainu [Saru dialect] (Japan) [informal] Hioy'oy
[Akan, see Asante and Fante]
Akha (China, Southeast Asia) Gui lah hui te ha
Akha (China, Southeast Asia) Gui lah hui mi a de
Akha (China, Southeast Asia) Gui lah hui dui dui ma
Akha (Thailand) Ghu long khu me-ah
Akha (Chiang Rai Northern Thailand) Gu lah hu ma de
Aklanon (Philippines) Saeamat kimo
Alabamu (Texas USA) Alíila
Alabamu (Texas USA) Kano
Alabamu (Texas USA) Kanobi
Alabamu (Texas USA) [informal] Tá
Alabamu (Texas USA) [very much] Alíilamoolo
Alabamu (Texas USA) [very much] Kanoomoolo
Alabamu (Texas USA) [very much] Kanopalammoolo
Albanian (Albania, Yugoslavia) Ju falem nderit
Albanian (Albania, Yugoslavia) Faleminderit
Albanian (Albania, Yugoslavia) [very much] Faleminderit shumë
[Aleut, see Unagan]
Altai (Russia) Bïyan bolzïn
[Alutiiq, see Suqpiaq]
Ambo (Angola, Namibia) Ondapandula unene
Amharic (Ethiopia, Israel, Egypt) Amesegënallô
Amharic (Ethiopia, Israel, Egypt) Amesegunalhun
Amharic (Ethiopia, Israel, Egypt) [very] Betam amesegënallô
Amuzgo (Mexico) Quialva'
[Anishinaabe, see Ojibwe]
Apache (Arizona USA) Ashoge
Apache (Arizona USA) [formal] Áshood
Apache [Jicarilla] (Arizona USA) Ihe edn
Apache (Arizona USA) [informal] Ahíyi'ee
Apalachicola (Florida USA) Mvto
Apsaaloke (United States) Ahoo
Apsaaloke (United States) Ahó
Apsaaloke (United States) [very much] Ahókacira
Arabic (Middle East, North Africa) Shukran
Arabic (Middle East, North Africa) [very] Shukran gazilan
Arabic (Syria) Mamnuun
Arabic (North Africa) SaHHa
Arabic (Morocco) [lit. Praise to Allah] El-hamdullah
Arabic (Morocco) Barak llahu fik
Aragonese (Aragon Spain) Grazias
[Araucano, see Mapuche]
[Arawak, see Taino]
Armenian (Armenia, Russia, Middle East) Shnorhagallem
Armenian (Armenia, Russia, Middle East) Shterakravetsun
Armenian [Western] (Armenia) Shenorhagal em
Armenian [Western] (Armenia) [very much] Shad shenorhagal em
Armenian [Eastern] (Armenia) Sh'norhakal em
Armenian [Eastern] (Armenia) Shnorhakalutjun
Armenian (Armenia) [colloquial] Merci
Aromunian (Greece, Balkans) Multsãnjescu
Asante (Ghana) Meda w'asé
Asante (Ghana) Meda wo ase
Asante (Ghana) [very much] Meda wo ase paa paa paa
Assyrian [Eastern Assyrian] [by man] Basima
Assyrian [Eastern Assyrian] [by woman] Basimta
Assyrian [Eastern Assyrian] [by plural] Basimeh
Assyrian [Eastern Assyrian] Mesi
Assyrian [Eastern Assyrian] [very much] Hawit basima chim raba
Assyrian [Western Assyrian] (Assyria) Taudi
Asturian (Spain) Gracies
Atayal (Taiwan) Muhuway su
Atayal (Taiwan) Mhuway su'
Atayal (Taiwan) Mhuway su' balay
Atayal (Taiwan) [informal] Hway
Ateso (Uganda) Eyalama
[Aukan, see Ndjuka]
Aymará (Bolivia, Peru, Chile) Juspajaraña
Aymará (Bolivia, Peru, Chile) Juspajarkätam
Aymará (Bolivia, Peru, Chile) Juspaxar
Aymará (Bolivia, Peru, Chile) Yuspagara
Aymará (Bolivia, Peru, Chile) Dios pagarakátam
Aymará (Tihuanacu Bolivia) Yusulupay
Aymará (Lake Titicaca Bolivia) [rare] Yuspagarkàtam
Aymará (Lake Titicaca Bolivia) [rare] Yuspagaràtam
Azerbaijani [Azeri] (Azerbaijan, Iran) Sayol
Azerbaijani (Azerbaijan, Iran) Sag olun
Azerbaijani (Azerbaijan, Iran) Tæshækkür elæyiræm
Azerbaijani (Azerbaijan, Iran) [very much] Chokh sag olun
[Azeri, see Azerbaijani]
[Aztec, see Náhuatl]

Bakweri (Cameroon) Masuma
Bakweri (Cameroon) Na somi saisai
Balinese (Bali) [Halus speech] Tiang matur suksama
Balinese (Bali) Matu suksama
Balinese (Bali) Matur suksme
Balochi (Pakistan) Tai merbani
Bambara (Mali) [singular] I ni ce
Bambara (Mali) [plural] Aw ni ce
Bambara (Mali) [said by man] Nba
Bambara (Mali) [said by woman] Nse
[Bangla, see Bengali]
[Basa Sunda, see Sundanese]
Bashkir (Russia) Rekhmet
Basque (Spain, France) Eskerrik asko
Basque (Spain, France) Mila esker
Basque [Navarrese] (Spain) Esker mila
Basque [Navarrese] (Spain) Esker aunitz
Basque [Roncalais] (Spain) Eskerrik anitx
Batak (Indonesia, Sumatra, Philippines) Mauliate
[Bavarian, see German (Bavaria)]
Belorussian (Belarus) Dziakuju
Belorussian (Belarus) Dziákuj
Bemba (Zambia, Congo-Brazaville) Tsikomo
Bemba (Zambia, Congo-Brazaville) Twa to te la
Bengali (India, Bangladesh) Dhanyabad
Bengali (India, Bangladesh) [very much] Ozasro dhanyabad
[Bisayan, see Visayan]
Bislama (Vanuatu) Tangkiu
Bislama (Vanuatu) Tangkyu
Bislama (Vanuatu) [very much] Tangkiu tumas
Bislama (Vanuatu) [informal] Ta
Bisu (Xhina, Thailand, Myanmar) Ang hmèn yá
Blackfoot (Alberta Canada, Montana USA) Nitsíniiyi'taki
Boboda (Burkina Faso, Mali) Baraka
[Bobo Fing, see Boboda]
Bosnian (Bosnia and Hercegovina) Hvala
Bosnian (Bosnia and Hercegovina) [respect] Hvala vam
Breton (Brittany France) Trugarez
Breton (Brittany France) [formal] Trugarez deoc'h
Breton (Brittany France) [informal] Trugarez dit
Breton (Brittany France) [informal] Mersi dit
Breton (Brittany France) Ho trugarekaat
Brigidian (western Ireland) Boche'
Bru (Vietnam) Sa-aun
Bukusu (Mt. Elgon Kenya) Nasima
Bukusu (Mt. Elgon Kenya) Orio muno
Bukusu (Mt. Elgon Kenya) Webaale
Bukusu (Mt. Elgon Kenya) Wanyala
Bulgarian (Bulgaria) Blagodarya
Bulgarian (Bulgaria) Mersi
Bulgarian (Bulgaria) [thank you very much] Mnogo blagodarya
Bulu (Cameroon) Akeva
Bunun (Taiwan) Uninang
Bura (Nigeria) Maraba
Burmese (Myanmar) Chezu ba
Burmese (Myanmar) Chezu tinbade
Burmese (Myanmar) [thank you very much] Amyaji chezu tinbade
Burushashki (Northern Pakistan) Juu na
Burushashki (Northern Pakistan) Juu goor maniSh
Burushashki (Northern Pakistan) Shukria
Burushashki (Northern Pakistan) Bakhshish
[Byelorussian, see Belorussian]

Cahuila (United States) 'Ácha-ma
Cakchikel (Mexico) Matiosh chawe
[Cambodian, see Khmer]
Camuno (Italy) Gràsce
Cantonese [Chinese] (China) [for gift] Doh je
Cantonese [Chinese] (China) [for service] M goi
Cantonese [Chinese] [in advance- for gift] Doh je sin
Cantonese [Chinese] [in advance- service] M goi nei sin
Cassubian (Northweast Poland) Dzãkujã
Cassubian (Northweast Poland) [informal] Dzãczi
Cassubian (Northweast Poland) [old] Bóg zaplac
Catalan (Andorra, Spain, France) Gràcies
Catalan (Andorra, Spain, France) [very] Moltes gràcies
Catalan (Andorra, Spain, France) Mercès
[Cebuano, see Visayan]
Cham (Southeast Asia) Uan tabuan
Chamorro (Guam) Si yuus maasi
Chamorro (Guam) Si yu'os ma'ase'
Chatino (Tataltepec Mexico) Ngua tsaa xlay'be hii
Chechen (North Caucasus) Barkal
Chechen (North Caucasus) Barkalla
Cherokee (United States) Wa'-do
Cheyenne (United States) Néá'eshe
Cheyenne (United States) [plural] Néá'êshemeno
Cheyenne (United States) [intertribal] Hahóo
Chichewa (South Africa, Malawi) Zikomo
Chichewa (South Africa, Malawi)[very much] Zikomo kwambiri
Chichewa (South Africa, Malawi)[very much] Zikomo kwambili
Chilomwe (Malawi) Zikomo
Chilomwe (Malawi) [thank you very much] Zikomo kwambili
[Chinese, see dialects: Cantonese, Hoi San, Hokkien and Mandarin]
Chingoni (Malawi) Zikomo
Chinook Jargon (North America) Masiem
Chinook Jargon (North America) Mahsie
Chinyanja (Zambia, Mozambique) Zikomo
Chinyanja (Zambia, Mozambique) [very much] Zikomo kwambiri
[Chippewa, see Ojibwe]
Chishona (Zimbabwe) [to one person] Ndatenda
Chishona (Zimbabwe) [to one person] Ndinotenda
Chishona (Zimbabwe) [to a group] Tatenda
Chishona (Zimbabwe) [to a group] Tinotenda
Chishona (Zimbabwe) [for doing a task] Mazviita
Chishona (Zimbabwe) [for doing a task] Maita basa
Chishona (Zimbabwe) [for doing a task] Maita zvenyu
Chitonga (Malawi) Yewo
Chitonga (Malawi) [very much] Yewo chemene
Chitonga (Zambia) Twalumba
Chitumbuka (North Malawi) Yewo
Chitumbuka (North Malawi) [very much] Yewo chemene
Chitumbuka (North Malawi) [very much] Yewo chomene
Chiyao (South Malawi) Sikomo
Chiyao (South Malawi) Asante
Chiyao (South Malawi)[thank you very much] Sikomo kwejinji
Chiyao (South Malawi)[thank you very much] Asante sana
Choctaw (Oklahoma United States) Yokoke
Choctaw (Oklahoma United States) Yakoke
Chol (Mexico) Wokolix awölö
Chol (Mexico) Wokol a wala
Chortí (Guatemala) Ch'ahp'ei'x ta'p'a
Chuj (Guatemala) Yuj wal dios
Chuukese (Micronesia) Kili so
Chuukese (Micronesia) [very much] Kili so chapur
Chuukese (Chuuk Lagoon Micronesia) Kini so
Chuukese (Chuuk Lagoon Micronesia) [very] Kini so chapur
Chuvash (Russia) Tavtapuch
Chuvash (Russia) Tav
Chuvash (Russia) Tavssi
[Circassian, see Adyghe]
Coeur d'Alene (Idaho United States) Limlemtsch
Comanche (North America) Ura
Comanche (North America) Urako
Comori (Comoros) Marahaba
Comori (Comoros) Marahabha
[Conibo, see Shipibo]
Cornish [middle/unified] (Great Britain) Dew re-dallo dheugh-why
Cornish [middle/unified] (Great Britain) Durdala dywy
Cornish [modern] (Great Britain) Durdaladawhy
Cornish [modern] (Great Britain) Gwra'massi
Cornish [modern] (Great Brit.) [very much] Merastawhy
Cornish [Kemmyn] (Great Britain) Meur ras
Cornish (Great Britain) Meur ras dhis
Corsican (France) Grazia
Corsican (France) À ringraziè vi
Corsican (France) À ringraziavvi
Cree (Canada) (to one person) Kinanâskomitin
Cree (Canada) (to more than one person) Kinanâskomitinawaw
Cree (Canada) E'kosi
Cree (Canada) Têniki
Cree (Canada) Mikwec
Cree (Canada) Nunasko'mowin keya
Cree [Ouje Bougoumou] (James Bay Canada) Mîkwêc
Cree [Plains Cree] (Canada) Kitatamihin
[Creek, see Muskogee]
Creole (West Indies) Mese
[Créole (Seychelles), see Seselwa]
Crioulo (Guinea-Bissau) Obrigado
Croatian (Bosnia, Yugoslavia) Hvala
Croatian (Bosnia, Yugoslavia) [very much] Puno hvala
Croatian (Bosnia, Yugoslavia) [very much] Hvala lijepa
[Crow, see Apsaaloke]
Czech (Czech Republic) Dêkuji
Czech (Czech Republic) [informal] Dik'

Dagaare (Burkina Faso, Ghana) Barka
Dagaare (Burkina Faso, Ghana) Puorra bebe la
Dakota (North America) Pidamayado
Dakota (North America) [by male] Pidamaya yedo
Dakota (North America) [by female] Pidamaya ye
Danish (Denmark, Greenland) Tak
Danish (Denmark, Greenland) [very much] Mange tak
Dega (Vietnam) Lac jak
Dega (Vietnam) [very much] Lac jak ko ih lu
Deg Xinag (Alaska) Dogedinh
Deg Xinag (Alaska) Xisrigidisddhinh
Dekelh [Carrier] (Canada) Musi
Dekelh [Carrier] (Canada) [very much] Musicho
Dekelh [Lheidli] (Canada) [by one to one] Snachailya
Dekelh [Lheidli] (Canada) [by one to 2+] Snachalhuya
Dekelh [Lheidli] (Canada) [by 2 to 1] Nahnachailya
Dekelh [Lheidli] (Canada) [by 2 to 2+] Nahnachalhuya
Dekelh [Lheidli] (Canada) [by 3+ to 1] Nenachailya
Dekelh [Lheidli] (Canada) [by 3+ to 2+] Nenachalhuya
Dekelh [Nak'albun] (Canada) [by 1 to 1] Snachailya
Dekelh [Nak'albun] (Canada) [by 1 to 2+] Snachalhya
Dekelh [Nak'albun] (Canada) [by 2+ to 1] Nenachailya
Dekelh [Nak'albun] (Canada) [by 2+ to 2+] Nenachalhya
Dekelh [Saik'uz] (Canada) [by one to one] Snachailya
Dekelh [Saik'uz] (Canada) [by one to 2+] Snachalhuya
Dekelh [Saik'uz] (Canada) [by 2 to 1] Nahnachailya
Dekelh [Saik'uz] (Canada) [by 2 to 2+] Nahnachalhuya
Dekelh [Saik'uz] (Canada) [by 3+ to 1] Nenachailya
Dekelh [Saik'uz] (Canada) [by 3+ to 2+] Nenachalhuya
[Delaware, see Lenape]
Dhivehi (Maldives) Shukuriyyaa
Dhivehi (Maldives) [very much] Varah bodah shukriyyaa
Dinka (Sudan) Yin acaa muoc
Diola (Senegal) Mersi
Diola (Senegal) Emitekati
Domari (Egypt) Daarim
Dusun (Sabah Malaysia) Pounsikou
Dutch (Netherlands, Belgium) [polite] Dank u
Dutch (Netherlands, Belgium) [informal] Dank je
Dutch (Netherlands, Belgium) [polite] Dank u wel
Dutch (Netherlands, Belgium) [informal] Dank je wel
Dutch (Netherlands) Bedankt
[Dyerma, see Zarma]
Dyula [Jula] (Cote d'Ivoire, Burkina Faso) I ni che
Dzongkha (Bhutan) Kadinche
Dzongkha (Bhutan) Kadinche la

Edo (Nigeria) Ù rú èsé
Egyptian (ancient Egypt) [to a man] Dua Netjer en ek
Egyptian (ancient Egypt) [to a woman] Dua Netjer en etj
Ekegusii (Kenya) Imbuya mono
Enga (Papua New Guinea) Tángeyoo
English (America, Australia, UK, New Zea.) Thank you
English (America) [informal] Thanks
English (Australia) Ta
English (New Zealand, Midland England) Cheers
English [Strine dialect] (Australia) Thenks
English [Strine dialect] (Australia) Enks
English [old English] (old Britain)[sing.] Ic þancas do
English [old English] (old Britain)[sing.] Ic þancie þe
English [old English] (old Britain)[plur.] Ic sæcge eow þancas
English [Texan] (Texas United States) Thank ya
[Eskimo, see Inuktitut and Inuttut]
Esperanto (international use) Dankon
Esperanto (international use) Dankon al vi
Estonian (Estonia) Tänan
Estonian (Estonia) Aitäh
Estonian (Estonia) [to a man] Ole meheks
Estonian (Harjumaa Estonia) Aitih
Estonian (Viru-Nigula Estonia) Aiteh
Estonian (Vastseliina Estonia) Tehnän
Eton (Cameroon) Abumgang
Eton (Cameroon) Abuimgang
Ewe (Ghana, Togo) Mudo
Ewe (Ghana, Togo) Akpe
Ewe (Ghana, Togo) Mudu, epenau
Ewondo (Cameroon) Abui ngan
Eyak (Alaska) 'Awa'ahdah

Fang (Gabon) Abora
Fante (Ghana, Burkina Faso) Medagse
Fante (Ghana, Burkina Faso) Medawagse
Faroese (Faroe Islands) Takk
Faroese (Faroe Islands) Takk fyri
Farsi [Persian] (Iran, Afghanistan) Merci
Farsi (Iran, Afghanistan, Tajikistan) Tashakkur
Farsi (Iran, Afghanistan, Tajikistan) Motehshakeram
Farsi (Iran) Mamnoon
[Filipino, see Tagalog and Visayan]
Fijian (Fiji) Vinaka
Fijian (Fiji) [very much] Vinaka vakalevu
Fijian (Fiji) [very much] Vinaka sara vakalevu
Finnish (Finland) Kiitos
Finnish (Finland) Kiitoksia
Finnish (Finland) [formal] Paljon kiitoksia
Finnish (Finland) [informal] Kiitti
[Flemish, see Dutch (Belgium)]
Fon (Benin, Togo) Ablo
Fon (Benin, Togo) A houanu
Fon (Benin, Togo) [very much] A houanu ka ka
Fon (Benin, Togo) [formal] E na ce nu we
French (France, Belgium, Africa, Canada) Merci
French (France, Belgium, Africa, Canada) Merci beaucoup
Frisian [Westerlauwer] (Netherlands) Tanke
Frisian [Westerlauwer] (Netherlands) Tanke wol
Frisian [Westerlauwer] (Netherlands) Tankje
Frisian [Westerlauwer] (Netherlands) Tankje wol
Friulian (northern Italy) Graciis
Fulani (West Africa) Jaaraama
Fulani (West Africa) [to one person] A jaaraama
Fulani (West Africa) [to several people] On jaaraama
Futuna (Wallis and Futuna) Malo
Futuna Aniwa (Vanuatu) Fafetai
Futuna Aniwa (Vanuatu) Jinisa

Ga (Ghana) Ogiwadong
Gaam (Eastern Sudan) Áwdém áalò
Gaam (Eastern Sudan) Àayyá
Gagauz (Moldova) Saa olsun
Galician (Spain) Gracias
Gallo (France) Mèrczi
Garifuna (Guatemala) Téngi nían bún
Gascon (France) Merci
Georgian [Kartuli] (Georgia/former USSR) Mahd-lob
Georgian [Kartuli] (Georgia/former USSR) Gmadlob
Georgian (Georgia) [to more than 1 person] Mahd-lobt
Georgian (Georgia) [to more than 1 person] Gmadlobt
German (Central Europe) Danke
German (Central Europe) Danke schön
German (Central Europe) Vielen Dank
German (Central Europe) [informal] Dank dir
German (Austria) [in spoken language] Dankschen
German (Bavaria) [in spoken language] Danksche
German (Switzerland) [in spoken language] Dank schön
German (Zurich Switzerland) [spoken] Dankë
German (Zurich Switzerland) [spoken] Dank schön
German (Zurich Switzerland) Merci
German (Zurich Switzerland) [very much] Merci villmahl
Gong (Thailand) Ang kêun
Greek [Hellenic] (Greece, Cyprus) Efcharisto
Greek (Greece, Cyprus) Sas efharisto
Greek (Greece, Cyprus) [very much] Efharisto poli
Greek (Greece, Cyprus) [very much] Sas efharisto poli
Griko (Salento Italy) Kali' sso'rta-ssu
Guarani (Paraguay, Brazil, Bolivia) Aguije
Guarani (Paraguay) Aguyje
Guarani [Mbyá] (Brazil) Ha'evete
Gujarati (India, Bangladesh, S. Africa) Aabhar
Gujarati (Gujerat State, India) Dhanyawaad
Gumatj (Australia) Ga'
Gurrangung (Australia) Yaddung jee
Gurung (Nepal) [to a child] Syaabaas
Gurung (Nepal) [to an equal or superior] Dxanyaa'baad
Gwich'in (Alaska) Mahsi'
Gwich'in (Alaska) Mahsi' choo
[Gypsy, see Romani]
G/wi [San] (Kalahari Africa) !kaen se !tau
G//ana [San] (Kalahari Africa) Kaen se !tau

Haida (Alaska) Háw'aa
[Hal-Pulaar, see Fulani]
Hän (Alaska) Mahsi'
Harari [Adare] (Ethiopia) Gaza yagabzal yushen
Harari [Adare] (Ethiopia) Alla magah
Hassaniya (Mauratania) Shukram
Hausa (West Africa) Na gode
Hausa (West Africa) Yauwa
Hawaiian (Hawaii) Mahalo
Hawaiian (Hawaii) [very much] Mahalo nui loa
Hebrew (Israel) Toda
Hebrew (Israel) [very much] Toda raba
[Hellenic, see Greek]
Helong (Timor, Semau Island Indonesia) Nodan mamomamo
Hindi (India, East Asia, Suriname) Shukriya
Hindi (India, East Asia, Suriname) Danyavad
Hindi (India, East Asia, Suriname) Dhanyawaad
Hiri Motu (Papua New Guinea) Tanikiu
Hmong Daw (Laos, Thailand) Ua tsaug
Hmong Daw (Laos, Thailand) Ua koj tsaug
Hmong Daw (Laos, Thailand) [very much] Ua tsaug ntau
Hmong Daw (Laos, Thailand) [very much] Ua koj tsaug ntau
Hmong Du (Vietnam) Ô chò
Hmong Njua (Laos, Thailand) Ua tsaug
Hmong Njua (Laos, Thailand) [very much] Ua tsaug ntau ntau
Hmong Njua (Northern Thailand) Zoo sab muab
Hñähñu (Mexico) Jamadi
Hoi San (China) U de
Hokkien [Chinese] (Singapore, Indonesia) Gum xia
Hokkien [Chinese] (Taiwan) Kam sia
Hopi (North America) [said by men] Kwakwhá
Hopi (North America) [said by women] Askwali
Hopi (North America) [said by women] Hevé
Hopi (North America) [very much, by men] Is kwakwhá
Hopi (North America) [very much, by women] Is askwali
Houailou (New Caledonia) Ei
Huambisa (Peru) See
Huambisa (Peru) Maake
Huaorani (Ecuador) Ewa ra
Huastec (Mexico) Jalbinchi yaan
Huastec (Mexico) C'ac'naamal yaan
Huave (Mexico) Dios mangüy ic
Huichol (Nayarit and Jalisco Mexico) Pan parius
Huichol (Nayarit and Jalisco Mexico) Pam parios
Hungarian [Magyar] (Hungary) Köszönöm
Hungarian [Magyar] (Hungary) Köszi
Hungarian [Magyar] (Hungary) [very much] Nagyon köszönöm
Hungarian [Magyar] (Hungary) [very much] Köszönöm szépen
Huron [Wyandotte] (USA, Canada) Yontonwe
Huron [Wyandotte] (USA, Canada) Ti-jiawen

[Ibo, see Igbo]
Icelandic (Iceland) Takk
Icelandic (Iceland) Takk fyrir
Icetot (Uganda) Ilakasugotia
Ido (international use) Danko
Igbo [Ibo] (Nigeria) Imena
Igbo [Ibo] (Nigeria) Imela
Igbo [Ibo] (Nigeria) Yâuwá
Igbo [Ibo] (Nigeria) Dalu
[Ik, see Icetot]
Ilokano (Philippines) Dios ti agngina
Ilokano (Philippines) Agyamanac
Ilokano (Philippines) [very much] Agyamanac unay
Ilonggo (Philippines) Salamat
Ilonggo (Philippines) Daghang salamat
Indonesian (Indonesia) [formal] Terima kasih
Indonesian (Indonesia) [informal] Makasih
Indonesian (Indonesia) [very informal] Thanks ya
Indonesian (Jakarta Indonesia) [slang] Trims
Ingush (Russia) Barkal
Ingush (Russia) [in spoken language] Barkl
Ingush (Russia) [lit. thanks be to you] Barkal xalda hwa
Ingush (Russia) [thank you very much] Saagha xalda hwa
Ingush (Russia) [thank you very much] Deala reaza xalda hwuona
Innu (Labrador and Quebec Canada) Tshinashkumitan
Interlingua (constructed) Gratias
Inuktitut (Baffin Island Canada) Qujannamiik
Inuktitut (Canada) Qujanaq
Inuktitut (Canada) [very much] Qujanarssuaq
Inuktitut (Canada) Mutna
Inuktitut (Canada) Nakorami
Inuktitut (Alaska) Taikkuu
Inuktitut (Barrow Alaska) Quyanaq
Inuktitut (Barrow Alaska) [very much] Quyanaqpaq
Inuktitut (Noatak Alaska) Taku
[Inupiaq, see Inuktitut]
Inuttut [Greenlandic] (Greenland) Qujanaq
Ioway (United States) [by men] Aho
Ioway (United States) [by women] Aha
Irish Gaelic (Ireland, Britain) [to one] Go raibh maith agat
Irish Gaelic (Ireland) [to more than one] Go raibh maith agaibh
Irish Gaelic (Ireland, Britain) Go raibh maith 'ad
Irish Gaelic (Ireland, Britain) [to one] Go raibh mile maith agat
Irish Gaelic (Ireland) [to more than one] Go raibh mile maith agaibh
Isamurongen (Batanes Philippines) Dios mamajes dinio
Italian (Central Europe, E Africa) Grazie
Itbayaten (Batanes Philippines) Ah Dios mamexes
Itbayaten (Batanes Philippines) Ah Dios mamexes dimo
Itbayaten (Batanes Philippines) Dios mamexes dimo
Itbayaten (Batanes Philippines)[very much] Rakux u kapamaxemaxes namen dimo
Ivasayen (Batanes Philippines) Dios mamajes dimo
Ivasayen (Batanes Philippines) [very much] Mamajemajes kami dimo su racuj
Itzaj [Itzá Maya] (Guatemala) D'yos b'ot'ik ti'ij
Itzaj [Itzá Maya] (Guatemala) D'yos b'o'tik
Itzaj [Itzá Maya] (Guatemala) D'yos b'o'tikil
Ixcatec (Mexico) Skanaa-ri
Ixil (Guatemala) Ta'n tiz

Jacalteca (Guatemala) Nich'an tiox
Japanese (Japan) Arigato
Japanese (Japan) Domo arigato
Japanese (Japan) [act of thanks not ended] Arigato gozaimasu
Japanese (Japan) [act of thanks has ended] Arigato gozaimashita
Japanese [Izumo] (Japan) Dan san
Japanese [Kansai Ben](Kansai, Osaka Japan) Ookini
Japanese [Kansai Ben](Kansai, Osaka Japan) Ookini arigatou
Japanese [Kumamoto] (Japan) Kora doshi
Japanese [Kyo Kotoba] (Kyoto Japan) Ohkini
Japanese [Shodoshima] (Shodoshima Japan) Ookini
Japanese [Tohoku Ben] (northeast Japan) Oshoshina
Japanese [Uchinaaguchi] (Okinawa Japan) Nihwee-deebiru
Jaqaru [Jacaru] (South America) Jilatyi
Javanese (Indonesia) Matur nuwun
Javanese (Indonesia) Kesuwun
Jèrriais (Jersey) Mèrci bein des fais
[Jula, see Dyula]

Kabuverdianu (Cape Verde) Obrigadu
Kabyle (Algeria) Tamemmirt
Kachin (Burma) Chyeju kaba sai
Kachin (Burma) Chyeju gaba sai
Kadazan (Sabah Malaysia) Kotohuadan
Kala Kawaw Ya (Australia) Eso
Kalmyk (Russia) Khanganav
Kanienkehaka [Mohawk] (Canada, USA) Niawen
Kanjobal [Q'anjob'al] (Guatemala) Yujwal Dios
Kanjobal [Q'anjob'al] (Guatemala) Yuj wal tyoxh
Kanjobal [Q'anjob'al] (Guatemala) Yuj wal ch'an tyoxh
Kannada (India) Dhanyawaadagalu
Kannada (India) Vandane
Kannada (India) Vandanegalu
Kanuri (Nigeria) Ardeneskin
Kapampangan (Philippines) Salamat
Kapampangan (Philippines) [formal] Salamat pu
Karaim (Trakai Lithuania) Tabu
Karakalpak (Uzbekistan) Rahmet
Karelian (Finland, Russia) Spassibo
Karelian [Tver] (Russia) Passibo
Karen (Thailand) Da blu
Karen (Thailand) [very much] Da blu do ma law
[Karen, see also Pho Karen and Sgaw Karen]
[Kartuli, see Georgian]
Karuk [Karok] (California USA) Yo-twa
Kasem (Ghana, Burkina Faso) De N lei
Kasem (Ghana, Burkina Faso) A ke lei naa
Kashmiri (India, Pakistan, China) Shukria
Kashmiri (India, Pakistan, China) Danawad
Kaurareg (Australia) Eso
Kaurna (Southern Australia) Ngaityalya
Kazakh (Kazakhstan, Central Asia, China) Rahmet
Kazakh (Kazakhstan, Central Asia, China) Rahmet sizge
Kekchi [K'ekchí] (Guatemala) Bantiox
Kekchi (Guatemala) B'antiox
Keres (Southwestern United States) Khuu'a
Keres (Southwestern United States) Da-waa-ee
Khakas (Siberia Russia) Aalghïstapcham
Khakas (Siberia Russia) Ispasiba
Khmer [Cambodian] (Cambodia) Ar kun
=Khomani (South Africa) /Aise
Khowar (Central Asia) Shukria
Khowar (Central Asia) Mehrbani
Khowar (Pakistan) Tazim
Kichagga (Tanzania) Haika
Kidavida (Africa) Chavucha
Kiembu (Africa) Ni waro
Kiga (Africa) Kazaare
Kiga (Africa) Webare
Kiga (Africa) Mwebare
Kiga (Africa) Yebare
Kiga (Africa) Otyo
Kiga (Africa) Osyo
Kikamba (Tanzania) Ni oseo

Kikongo (Congo, Angola) Ntôndili kwami
Kikongo (Congo, Angola) Merci mingi
Kikongo (Congo, Angola, Cuba) Ndondele
Kikongo (Congo, Angola, Cuba) Ntandele
Kikongo (Congo, Angola, Cuba) Wuanka
Kikongo (Cuba) Nkimandi
Kikongo (Cuba) Manbote
Kikuyu (Africa) Ni wega
Kikuyu (Africa) Thengiu
Kikwe (Africa) Niwega muno
Kiluba (Congo-Kinshasa) Wafwa ko
Kinyamwezi (Africa) Wabeeja
Kinyarwanda (Rwanda, Congo-Kinshasa) Murakoze
Kinyarwanda (Rwanda, Congo-Kinshasa) [inf] Urakoze
Kiowa (North America) Aahóow
Kipsigis (Uganda) Kongoi
Kirgiz (Kyrgyzstan) Rakhmat
Kirgiz (Kyrgyzstan) Chong rakhmat
Kiribati (Pacific Is.) Ko rabwa
Kirundi (Burundi) Murakoze
Kisanga (Bunkeya Congo-Kinshasa) Tua santa
Kiswahili (Southeast Africa) Asante
Kiswahili (Southeast Africa) Aksante
Kiswahili (Southeast Africa) Ahsante
Kisawhili (Southeast Africa) [to several] Asanteni
Kiswahili (Southeast Africa) [very much] Asante sana
Kiswahili (Southeast Africa) Shukrani
Kiswahili (Southeast Africa) Nashukuru
Kituba (Africa) Melesí
Klallam (Washington United States) Há'neng cen
Klallam (Washington USA) [to a friend] Há?neng cen, naschá?che
Klallam (Washington USA) [to friends] Há?neng cen, nescháye?che
Klallam (Washington USA) [to a friend] Neschá?che cxw
Klallam (Washington USA) [for a gift] Há?neng cen ?a? ce n's?éngateng
Koasati (Alabama & Oklahoma United States) Tâ
Koasati (Alabama & Oklahoma United States) Alí:la mó
Kohistani (Central Asia) Shukria
Koiari (Papua New Guinea) Maigo
Koiari (Papua New Guinea) Maiteka
Komi-Permyak (Russia) Atto
Komi-Zyryan (Russia) Attö
Konkani [Konknni] (India) Dhanyawaada
Konkani [Konknni] (Goa India) Dev borem korum
Korean (Korea) Komapsumnida
Korean (Korea) Kamsahamnida
Korean (Korea) [very informal] Komawoyo
Kosraean (Micronesia) Kulo
Kosraean (Micronesia) [very much] Kulo maluhlap
Kosraean (Micronesia) [very much] Kulo na maluhlap
Koyukon (Alaska) Baasee'
Koyukon (Alaska) Anaa basee
Krio (Sierra Leone) Tenki ya
Krio (Sierra Leone) Tenkey
Kuna (Panama) Dot nuet
Kupsapiny (Uganda) Keyi tapon
Kurdi [Kurmanji] (Iraq, Iran) Shukur
Kurdi (Middle East) Sipas
Kurdi (Middle East) Sipas dikim
Kutthung (Australia) Murromboo
Kwakiutl (North America) Gilakas'la
Kwakiutl (North America) [very much] Ah gilakas'la
Kwanyama (Angola, Namibia) Nda pandula
Kwéyòl (Haiti) Mèsi
Kwéyòl (Haiti) [thank you very much] Mèsi plen
Kwéyòl (Haiti) [thank you very much] Mèsi anpil
Kwéyòl (Haiti) [thank you very much] Granmèsi

Ladakhi (India, Pakistan) Od dju
Ladakhi (India, Pakistan) Jule
Ladin (Gardena Valley Italy) De gra
Ladin (Badia Valley Italy) Dilan
Ladin (Fassa Valley Italy) [to one person] Detelpai
Ladin (Fassa Valley Italy) [plural] Develpai
Ladino (Spain) Gracias
Ladino (Spain) Munchas gracias
Lahu (Thailand) Ah bo
Lahu (Thailand) [very much] Ah bo u ja
Lahu (China, Southeast Asia) Aw bon uija
Lahu (China, Southeast Asia) Da ja
Lahu (China, Southeast Asia) Òboi jâ
Lakhota (North America) [by female] Pilamaya ye
Lakhota (North America) [by male] Pilamaya yelo
Lakota (North America) [very much] Pilamaya aloh
Lao (Laos) Khawp jai
Lao (Laos) [thank you very much] Khawp jai lai lai
[Lappish, see Sami]
Latin (ancient Rome, Vatican) Gratia
Latin (ancient Rome, Vatican) Gratias
Latin (ancient Rome, Vatican) Gratias tibi ago
Latin (ancient Rome, Vatican) Gratiam habeo
Latvian (Latvia) Paldies
Latvian (Latvia) [very much] Liels paldies
Lenape [Delaware] (United States) Wanìshi
Lepcha (India, Nepal, Bhutan) Trok chi
Lingala (Congo-Kinshasa, Congo-Brazaville) Melesí
Lingala (Congo-Kinshasa, Congo-Brazaville) Matóndo
Lingala (Congo-Kinshasa, Congo-Brazaville) Natondi yo
Lingua Franca (Mediterranean) Gratzia
Lingua Franca (Mediterranean) [very much] Mouchou gratzia
Lisu (China, Burma, Thailand) Xual mu wa
Lisu (China, Burma, Thailand) Dut zoil
Lisu (China, Burma, Thailand) Atkel bboxmu
Lisu (Thailand) Ahku bumu
Lithuanian (Lithuania) Achiu
Lithuanian (Lithuania) Dekoju
Lithuanian (Lithuania) [very much] Labai achiu
Lithuanian (Lithuania) Dekui
Lithuanian (Lithuania) Labai dekoju
Lithuanian (Lithuania) [very sincere] Nuoširdziai dekoju
Livonian (Latvia, Estonia) Tienu
Livonian (Latvia, Estonia) Tenu
Loglan (international) Sia
Low Saxon (Eastern Friesland, Germany) Dank
Low Saxon [Northern Low Saxon] (Germany) Danke
Low Saxon [Westphalian] (Germany) Ek dank auk schoin
Low Saxon [Westphalian] (Germany) Sind auk viellmaols bedankt
Lucumí (Cuba, United States) Moducué
Luganda (Uganda) Webale
Luganda (Uganda) [very much] Webale nyo
Luiseno (United States) No$un looviq
Lummi (United States) Hy'shqe siam
Lunda (Zambia) Kusakililaku
Lunyankole (South Uganda) Webale
Lunyoro (West Uganda) Webale
Luo (Kenya, Tanzania) Erokamano
Lushootseed (Seattle Washington USA) Ck'wálidxw
Lushootseed (USA) [for food or drinks] Helí'dubshewx
Luvale (Zambia) Gunasakulila
Luxembourgish (Luxembourg) Merci

[Maa, see Masai]
Maasai [Maa, Masai] (Kenya, Tanzania) Aske
Maasai (Kenya, Tanzania) Ashi
Maasai [Maa, Masai] (Kenya, Tanzania) Ashi oleng
Maasai (Kenya, Tanzania) [very much] Ashi naling
Mabuiag (Australia) Eso
Macedonian (Macedonia) Blagodaram
[Magyar, see Hungarian]
Makhua (Tanzania) Asantte
Makhua (Mozambique) Kooshukhuru
Makhua (Mozambique) Marahaba
Malagasy (Madagascar) Misaotra
Malagasy (Madagascar) [formal] Misaotra tompoko
Malagasy (Madagascar) [very much] Misaotra indrindra
Malay (Malaysia, Brunei) Terima kasih
Malay (Malaysia, Brunie) [very much] Terima kasih banyak-banyak
Malayalam (India) Nandi
Malayalam (India) Valarey nanhi
Malayalam (India) Nanni
Maldivian (Maldives) Sabkaa
Malinké (Senegal, Mali) Ni ke
Maltese (Malta) Grazzi
Maltese (Malta) [very much] Grazzi hafna
Mam (Guatemala) Chjóonte
Mam (Guatemala) Chjoonta
Mam (Guatemala) Chjónta tey
Mam (Guatemala) [to more than one person] Chjónta che
Mambwe (Tanzania, Zambia) Sanco
Mampruli (Ghana) Mossi
Manchu (China) Baniha
Mandarin [Chinese] (China) Xie xie
Mandarin [Chinese] (China) Toa chie
Mandinka (West Africa) Abaraka
Mandinka (West Africa) [to one person] I ning bara
Mandinka (West Africa) [to several people] Al ning bara
Manx (Britain) Gura mie ayd
Manx (Britain) Gura mie eu
Manx (Britain) [thank you very much] Gura mie mooar ayd
Maohi (South Pacific) Mauruuru
Maori (New Zealand) Tika hoki
Maori (New Zealand) Ka pai
Maori (Cook Islands) Meitaki
Maori (Cook Islands) [very much] Meitaki ma'ata
Mapuche [Araucano] (South America) Krasia may
Mapuche [Araucano] (South America) Chaltu
Mapuche [Araucano] (South America) Chaltu may
Mapuche [Araucano] (South America) Traeltu
Mapuche [Araucano] (South America) Manumeimi
[Mapudungun, see Mapuche]
Marathi (India) Abhari ahi
Marathi (India) Dhanyawaadh
Marathi (India) Dhanyawaatha
Mari (Russia) Tau
Marquesan (French Polynesia) Koutai
Marshallese (Marshall Islands) Kommol
Marshallese (Marshall Islands) [very much] Kommol tata
Marshallese (Marshall Islands) [very much] Kwölukkuun emmol
Mashi (Bukavu Congo-Kinshasa) Koko
[Mayan, see Yucatec]
Mazahua (Mexico) Pöjö
Mazatec (Mexico) Natejchiri
Mazatec (Mexico) Nkhi k'a ninashitechino
[Mbisu, see Bisu]
Mende (Sierra Leone) Baiika
Mende (Sierra Leone) Bisse
Mende (Sierra Leone) Baika
Meriam Mir (Australia) Eswau
[Miao, see Hmong]
Mien [Yao] (Laos, Thailand) Laengz zingh
Mien [Yao] (Laos, Thailand) Laengz zingh meih
Mien [Yao] (Laos, Thailand) [very much] Laengz zingh camv
Mien (Vietnam) Tö' dun
Mikmaq (Canada) Welálin
Mikmaq (Canada) Weláliek
Mina (Togo) Akpe
Mina (Togo) [very much] Akpe ka ka
Minangkabau (West Sumatra Indonesia) Tarimo kasih
Minangkabau (West Sumatra Indoensia) [inf] Makasi yo
Miskito (Nicaragua) Tingki
Miwok [S Sierra] (South Sierra USA) Tengkiju
Mixtec (Oaxaca Mexico) [formal] Kúta'ùná
Mixtec (Oaxaca Mexico) [familiar] Kúta'ùrí
Mixtec (Oaxaca Mexico) Kúta'ù shãàrí nuùro
Mixtec (Estetla Mexico)[formal-to one p.] Niku tab'i
Mixtec (Estetla Mexico)[formal-to several] Niku tab'o
Mixtec (Estetla Mexico) [informal] Ta xa'u zin
Mixtec (Magdalena Peñasco Oaxaca Mexico) Cutahvixieensa
Mixtec (Magdalena Peñasco Oaxaca Mexico) Cacutahvixensa
Mixtec (San Juan Colorado Mexico) Tyáhvi nyóò
Miyako (Ryukyu Island Japan) Nihedebil
[Mohawk, see Kanienkehaka]
Mohican (North America) Wneeweh
Mohican (North America) Oneowe
[Mokpwe, see Bakweri]
Moldavian (Moldova) Multumesc
Mon (Burma, Thailand) Tang kun
Monegasque (Monaco) Merçì
Mongolian (Mongolia, Northern China) Bayarlalaa
Mongolian (Mongolia, Northern China) Gyalailaa
Mongolian (Mongolia) [very much] Tand ikh bayarlalaa
Mongolian (Mongolia) [for hospitality] Saikhan zochluullaa
Mongolian (Mongolia) [for help] Ta ikh tus bolloo
Mòoré [Mossi] (Burkina Faso) Wenatase
Mòoré [Mossi] (Burkina Faso) Barka
Mòoré [Mossi] (Burkina Faso) Mpuusda barka
Mòoré [Mossi] (Burkina Faso) [very much] Barka wusgo
Mopá-maya (Guatemala) B'o'tic
Mordvin (Russia) Syukprya
Morisyen (Mauritius) Mersi
[Mossi, see Moore]
Motu (Papua New Guinea) Tanikiu
Mpi (Thailand) Mèu mèu
Mpongwe (Gabon) Kewa
Muskogee (Oklahoma & Florida USA) Mvto
Muskogee (Oklahoma & Florida USA) Henka
Muskogee (Oklahoma & Florida USA) Ka
Muskogee (Oklahoma & Florida USA) Akvsv'mkv

Náhuatl [Aztec] (Mexico) Tlazohcamati
Náhuatl [Aztec] (Mexico) Icnelia
Náhuatl [Aztec] (Mexico) [very much] Tlazohcamati huel miac
Náhuatl [Aztec] (Mexico) [very much] Tlazohcamatzin
Náhuatl (Tepoztlan Mexico) Tlazocama
Náhuatl (Tepoztlan Mexico) Tlazocamatl
Náhuatl (Tepoztlan Mexico) Tlazocamati
Náhuatl [classical: Aztec Empire] Nictlazohcamati
Nakota (USA, Canada) Pinamaya
Nama (Namibia) Aio
Nandi (Kenya) Kongoi
Nandi (Kenya) Kaigai
Nandi (Kenya) Asai
Napulitano (Italy) Gràzzie
Natick (North America) Tobotonoque
Natick (North America) Ttaubotneanauayean
Natick (North America) Kuttabotomish
Nauruan (Nauru) Tsuba kor
Navajo (United States) Ahéhee'
Naxi (Yunnan China) Jjef bei seiq
Ndebele (Zimbabwe) Ngeyabonga
Ndebele (Zimbabwe) Ngiyabonga
Ndebele (Zimbabwe) Ngiyathokaza
Ndebele (Zimbabwe) [very much] Ngeyabonga kakulu
Ndebele (Zimbabwe) [very much] Ngiyabonga kakulu
Ndebele (Zimbabwe) [plural] Siyabonga
Ndebele (Zimbabwe) [plural, very much] Siyabonga kakulu
Ndjuka (Suriname) Gaantangi fi ye
Ndjuka (Suriname) Gaantangi
Ndjuka (Suriname) A bigi ba
Nenets (Russia) Nyarya bada
Nepali (Nepal, Bhutan) Dhanyabaad
Newari (India, Nepal) Su-bhaay
Nez Perce (North America) Qe'ci'yew'yew'
Nganasan (Russia) Xoasi
Nganasan (Russia) Nägê
Ngbaka (Africa) Dé kãã
Ngizim (Nigeria) Ná goodoota-ngaa naa ci
Ngoni (Malawi) Zikomo
Nias [North Nias] (Nias Island Indonesia) Sauha gölö
Nias [South Nias] (Nias Island Indonesia) Söwö gölö
Nigerian Pidgin (Nigeria) Thank yu
Nigerian Pidgin (Nigeria) Well done
Niuean (Niue, South Pacific) Fakaaue
Niuean (Niue, South Pacific) [informal] Ha ia
Niuean (Niue, South Pacific) [very much] Fakaaue lahi mahaki
Norwegian [Nynorsk, Bokmaal] (Norway) Takk
Norwegian [Bokmaal] (Norway) [very much] Tusen takk
Norwegian [Sortlandsk] (Sortland Norway) Takk
Ntomba (Africa) Ebóto
Ntomba (Africa) Ewata

[Occitan, see Provencal]
Ojibwe [Chippewa, Anishinaabe] (N.America) Miigwech
Okanogan (North America) Lim limt
Oriya (India) Danna waat
Oromo (Kenya, Somalia) Ulfaad'd'a
Oromo (Kenya, Somalia) Waaqni sii haa kennu
Oromo (Kenya, Somalia) Maharaba
Oromo (Kenya, Somalia) Galatoomii
Oromo (Kenya, Somalia) Galatomaa
Oromo (Kenya, Somalia) Fayyaa ta'aa
Oromo (Kenya, Somalia) Fayyaa ta'i
Osage (USA) We'-a-hnon
Osage (USA) Thla-ho
Ossetian (Caucasus) Arfö
Ossetian (Caucasus) Buznyg
Otetela (Lodja Congo-Kinshasa) Losaka

Paamese (Vanuatu) Hihuri
Paamese (Vanuatu) Namasmasuk
Pa'ikwene (Amazon) Kibeiné
Paipai (Mexico, USA) 'Ara'ya:ikm
Paipai (Mexico, USA) 'Ara'yai:km
Paipai (Mexico, USA) 'Ara'ye:km
Paiwan (Taiwan) Malimali
Paiwan (Taiwan) Masalu
Palauan (Palau) Sulang
Palauan (Palau) Msuulaang
Palauan (Palau) Ke kmal mesaul
Panamahka (Nicaragua) Tingkih
Papiamentu (Dutch Antilles, Aruba) Danki
Pashto (Afghanistan) Tashakkur
Pashto (Afghanistan, Pakistan) Sta na shukria
Pende (Congo-Kinshasa) Hambadiahana
[Penobscot, see Abenaki]
[Persian, see Farsi]
Pho Karen (Thailand) Hsà khawn hsá ta má' lâw
[Pidgin English, see Nigerian Pidgin, Pijin and Tok Pisin]
Pijin (Solomon Islands) Tanggio
[Pikanii, see Blackfoot]
Pipil (El Salvador) Paampa diyúx
Pipil (El Salvador) Padiux
Plattdeutsch (Germany) Dankscheen
[Plautdietsch, see Plattdeutsch]
Pocomchí (Guatemala) Rin dios awe
Pohnpeian (Micronesia) Kalangan
Pohnpeian (Pohnpei) Kalangen en Komwi
[Police Motu, see Hiri Motu]
Polish (Poland) Dziekuje
Polish (Poland) [spoken by several people] Dziekujemy
Polish (Poland) [familiar] Dzieki
Polish (Silesia region, Southern Poland) Dziynki
Polish (Silesia region, Southern Poland) Dziynkuja
Polynesian (Polynesia) Auw'e
Ponpeian (Ponpei) Kelangan
Popoluca (Mexico) Ni'ctíyus
Portuguese (Portugal, Brazil) [by male] Obrigado
Portuguese (Portugal, Brazil) [by female] Obrigada
Potawatomi (United States) Iwgwien
Potawatomi (United States) Migwe'c
Potawatomi (United States) Kcumigwe'c
Provencal [Occitan] (France) Mercé
Provencal [Occitan] (France) Gramaci
Provencal [Occitan] (France) [very much] Mercé plan
Pueblo [Acoma] (Southwestern USA) Da-wah-eh
[Pular, see Fulani]
Puluwat (Micronesia) Kilissow
Punjabi (India) Dhannvaad
Punjabi (India) Dannaba
Punjabi (India) Shukria
Punjabi (India) Miharbaanee
Punjabi (India) Tuhaadee kirpaa hai
Puyuma (Taiwan) Tayu'an

[Q'anjob'al, see Kanjobal]
Quechua Ancashino (Ancash Peru) Paylla
Quechua Ayacuchano (Ayacucho Peru) Yuspagrasunki
Quechua Ayacuchano (Ayacucho Peru) Dyuspagrasunki
Quechua Ayacuchano (Ayacucho Peru) Diyus pagapusonqa
Quechua Ayacuchano (Ayacucho Peru)[plural] Diyus pagapusonqacheh
Quechua Ayacuchano (Ayacucho Peru) [very] Anchata agradisiyki
Quechua Ayacuchano (Ayacucho)[very;plural] Anchata agradisiykicheh
Quechua Cochabambino (Cochabamba Bolivia) Diuspagarasunki
Quechua Cochabambino (Cochabamba Bolivia) Diuspagarapusunki
Quechua Cochabambino (Cochabamba Bolivia) Pachi
Quechua Cochabambino (Cochabamba Bolivia) Pachis
Quechua (Cuzco Peru & Cochabamba Bolivia) Yusulpayki
Quechua Cuzqueño (Cuzco Peru) Yusulpaykinsunki
Quechua Cuzqueño (Cuzco Peru) Yuspagarasunki
Quechua Cuzqueño (Peru)[to several people] Yuspagarasunkichis
Quechua Cuzqueño (Cuzco Peru) Añay
Quechua Cuzqueño (Cuzco Peru) Añachaykin
Quechua Cuzqueño (Cuzco Peru) Grasias
Quechua Cuzqueño (Cuzco)[very much/formal] Urpi sonqo
Quechua Cuzqueño (Cuzco)[very much/formal] Sinchitan añaychayki
Quechua Huancaño (Huanca Peru) Rasyas
Quiché [K'iche] (Guatemala) Maltiox
Quiché [K'iche] (Guatemala) [to a man] Maltiox tat
Quiché [K'iche] (Guatemala) [to a woman] Maltiox nan
Quiché [K'iche] (Guatemala) Sibälaj maltiox
Quiché [K'iche] (Guatemala) [for work] Cheri cha ai
Quichua (Ecuador) Pagui
Quichua (Ecuador) Pagui shungulla
Quichua (Ecuador) Diusulupagui
Quichua (Ecuador) Yupaichani

Rakhin (Myanmar) Chyee zu thon ree
Rapanui (Easter Island) Maururu
[Raramuri, see Tarahumara]
Resigaro (Peru) Kashoonopihku
Rohingya (Myanmar) Shukuria
Romani [Romany] [Gypsy] (Europe) Gestena
Romani [Romany] [Gypsy] (central Europe) Nais
Romani [Romany] [Gypsy] (central Europe) Nais tuke
Romani [Caló] (Spain) Najis tuke
Romanian (Romania) Multumesc
Romansch (Switzerland) Grazia
Romansch (Swizterland) Grazie
Romansch (Swizterland) Grazcha
Rotuman (Pacific Islands) Noa'ia
Rotuman (Pacific Islands) [said to child] Filo'montou
Rukai (Taiwan) Maulanenga
[Runasimi, see Quechua]
Russian (Russia) Spasibo
[Ryukyu, see Miyako]

[Saame, see Sami]
Saami [Lappish] (Scandinavia) Giitit itt
Saami [Lappish] (Scandinavia) Giittus
Saami [Lappish] (Scandinavia) Giitus
Saami [Lappish] (Scandinavia) [very much] Giitus eanat
Saami [Lappish] (Scandinavia) Giihtu
Saami [Lappish] (Scandinavia) Gaejtho
Saami [Davvi Saami] [Lappish](Scandinavia) Giitu
Saami [Inari Saami] [Lappish](Scandinavia) Takkâ
Saami [Skolt Saami] [Lappish](Scandinavia) Spässep
Saami [Skolt Saami] [Lappish](Scandinavia) Spä'sseb
Saanich (Vancouver Island Canada) Hay sxw q'a
Saanich (Vancouver Island Canada) Hay sxw q'e
Saisiat (Taiwan) Muhuway su
Samoan (Samoa) Fa'afetai
Samoan (Samoa) [thank you very much] Fa'afetai tele
[San, see G//ana, G/wi and =Khomani]
Sangha (Mali) Birepo
Sango (Central African Republic) Mèrèsi
Sanskrit (ancient India) Anugurihiitosumi
Sara (Chad) Angen
Saramaccan (Suriname) Gaantángí fii
Saramaccan (Suriname) F&uacteu;únu
Sardinian (Italy) Grassias
Sarnami (Suriname, Holland) Dhanbaad
Sarnami (Suriname, Holland) Dhanjabaab
Sarnami (Suriname, Holland) Sukriya
Sarnami (Suriname, Holland) Soekoeria
Sasak (Indonesia) Matur tampiasih
Sasak (Indonesia) Tampi asiq
Saulteaux (Manitoba Canada) Miigwech
Savonian (Ylä-Savo Finland) Kiitoksija
Scottish Gaelic (Scotland) Tapadh leat
Scottish Gaelic (Scotland) [formal] Tapadh leibh
Scottish Gaelic (Scotland) [many thanks] Moran taing
Scottish Gaelic (Southern Scotland) [for.] Gun robh math agaibh
Scottish Gaelic (Southern Scotland) [inf.] Gun robh math agad
Scots (Scotland) Thenk ye
Scots (Scotland) Thank ye
Scots [Ulster Scots] (Northern Ireland) Thenks
[Seminole, see Creek]
Senoufo (Cote d'Ivoire, Mali) Minkari
Senoufo (Cote d'Ivoire, Mali) Minmonchar
Sepedi (South Africa) Ke a leboga
Serbian (Bosnia, Yugoslavia) Hvala
Serbian (Bosnia, Yugoslavia) [very much] Hvala lepa
Seri (Sonora Mexico) Yooz ma samsisíinxo
Serrere (Senegal, Gambia) Dioka ndjiale
Seselwa [Seychelles Creole] (Seychelles) Mersi
Seselwa [Seychelles Creole] (Seychelles) Gran mersi
Sesotho (Lesotho, South Africa) Ke a leboha
Setswana (Botswana, South Africa) Ke itumtese
Setswana (Botswana, South Africa) Ke itumela
Setswana (Botswana, South Africa) Ke a leboga
Setu (Estonia) Aiteh
Sgaw Karen (Thailand) Tà byu' dô law
Sgaw Karen (Thailand) Dah bluet
Shanghai (Shanghai China) Sha ja non
Shanghai (Shanghai China) Sha sha
Shanghai (Shanghai China) [informal] Sha ja
Shelta (USA, Ireland) [old;no longer used] Djeelsha grawsta
Sherpa [Helambu] (Nepal, Tibet) Thuchi chea
Sherpa [Solu] (Nepal, Tibet) Thuchi che
Shimasiwa (Comoros) Marahaba
Shina (Central Asia, India) Shukria
Shina (Central Asia, India) Bakhshish
Shipibo (Peru) Iráque
Shipibo (Peru) [very much] Ichabires iráque
Shona, see Chishona]
Sicilian (Sicily Italy) Grazzii
Silozi (Zambia) Ni itumezi
Silozi (Zambia) Litumezi
Silozi (Zambia) Nitumezi
Sindhi (Pakistan) Mehrbani
Sinhalese (Sri Lanka) Istuti
Sinhalese (Sri Lanka) [very much] Bohoma istuti
Siswati [Swazi] (Swaziland)[by one person] Ngiyabonga
Siswati [Swazi] (Swaziland)[more than one] Siyabonga
Slovak (Slovakia) Dakujem
Slovak (Slovakia) [formal] Dakujem vám
Slovak (Slovakia) [informal] Dakujem ti
Slovenian (Slovenia) Hvala
Slovenian (Slovenia) [formal] Hvala vam
Slovenian (Slovenia) [familiar] Hvala ti
Slovenian (Slovenia) [very much] Hvala lepa
Solresol (old; international) Sol Ti
Somali (East Africa) Mahad sanid
Soninke (Mali, Senegal) Nawari
Sorbian [Upper Sorbian] (eastern Germany) Dz'akuju so
Sorbian [Lower Sorbian] (eastern Germany) Z'e'kujom se
Spanish (Spain, America) Gracias
Spanish (Spain, America) [very much] Muchas gracias
Spokane (United States) Chn lm-s-cút
Sranan (Suriname) Grantangi
Sranan (Suriname) Tangi
Sranan (Suriname) Danki
Sudovian (Baltic region) Denkâ
Sudovian (Baltic region) Denkauja
Suqpiaq (Alaska) Quyanaa
Sundanese [Basa Sunda] (Indonesia) Hatur nuhun
Sursilvan (Switzerland) Engraziel
Suryoyo (Syria, Turkey) Tawdi
Suryoyo (Syria, Turkey) [very much] Tawdi sagi
Susu (Guinea) Inwali
Swabian (Central Europe) Dankeschee
Swabian (Central Europe) Dankschee
[Swahili, see Kiswahili]
[Swazi, see Siswati]
Swedish (Sweden, Finland) Tack
Swedish (Sweden, Finland) Jag tackar
Swedish (Sweden, Finland) [very much] Tack så mycket
Swedish (Sweden, Finland) [very much] Tackar så mycket
Swedish (Sweden, Finland) [very much] Stort tack

Tagalog (Philippines) Salamat
Tagalog (Philippines) Salamat po
Tagalog (Philippines) Salamat sa iyo
Tagalog (Philippines) [very much] Maraming salamat
Tahitian (Tahiti) Mauruuru
Tahitian (Tahiti) Mauruuru roa
Taino [Arawak] (Caribbean) Oáan
Taino [Arawak] (Carribbean, Florida USA) Bo matum
Tajik (Tajikstan) Tashakur
Tajik (Tajikstan) Rakhmat
Taki-taki (French Guyana) Ganta
[Tamahoq, see Tamashek]
Tamashek [Tamahoq, Tuareg] (West Africa) Tanumert
Tamil (India, Southeast Asia) Nandri
Tamil (India, Southeast Asia) Nangreeih
Tamil (India, Southeast Asia) Romba nanringa
Tamil (India, Southeast Asia) Rumba nandri
Tamil (Madras/Chennai India) [colloquial] Rumba thanks
Tanaina (Alaska) Chin'an
Tanana (Alaska) Basee choo
Tanana (Alaska) Maasee'
Tanana [Upper Tanana] (Alaska) Tsen'ii
Tarahumara [Rarámuri] (Mexico) Matéterabá
Tarahumara [Raramuri] (Mexico) Matétera
Tarahumara [Raramuri] (Samachique Mexico) Natérarabá
Tashkorghani (Central Asia) Rahmat türi
Tatar (Russia) Rekhmet
Tay (Vietnam) Day fon
Telugu (India) Dhanyavaadaalu
Telugu (India) Tamara krutagntha
Tetum (East Timor) [by a man] Obrigado
Tetum (East Timor) [by a man] Obrigadu
Tetum (East Timor) [by a woman] Obrigada
Tetum (East Timor) [by a man] [very much] Obrigado barak
Tetum (East Timor) [by a man] [very much] Obrigadu barak
Tetum (East Timor) [by a woman][very much] Obrigada barak
[Teuso, see Icetot]
Tewa (Southwestern United States) Kuunda
Thai (Thailand) Khawp khun
Thai (Thailand) [by man] Khawp khun khrap
Thai (Thailand) [by woman] Khawp khun kha
Thai (Thailand) [by man] Khrap
Thai (Thailand) [by woman] Kha
Thai (Thailand) [very much] Khawp khun makh
Thangmi [Thami] (Himalayas) Sewa
Tibetan (Tibet, China) Tujechhe
Tigrinya (Ethiopia, Eritrea) Yrunyli
Tigrinya (Ethiopia, Eritrea) Yaqhanyelay
Tigrinya (Ethiopia, Eritrea) Yeqniyeley
Tigrinya (Ethiopia, Eritrea) Yekanyelay
Tlingit (Canada, northwest coast of USA) Guneshcheesh
Tlingit (Canada, Alaska) Gunalchéesh
Tlingit (Canada, Alaska) [very much] Gunalchéesh hó hó
Tlingit (Canada, Alaska) [very much] Atlein gunalchéesh
Tojolabal (Chiapas Mexico) Tzachatal
Tojolabal (Chiapas Mexico) Yuj
Tok Pisin [Pidgin English] (New Guinea) Tenkiu
Tok Pisin (New Guinea) Tenkyu
Tok Pisin (New Guinea) [very much[ Tenkyu tru
Tongan (Tonga South Pacific Island) Malo
Tongan (Tonga South Pacific Island) [very] Malo 'aupito
Toraja (Indonesia) Kurre sumange
[Torres Strait Broken, see Yumpla Tok]
Totonac (Veracruz Mexico) Paxkatkatzinil
[Tsalagi, see Cherokee]
Tschiluba (Kasai Oc. Reg., Congo-Kinshasa) Twasakadila
Tsimshian (Alaska) Way dankoo
Tsonga (South Africa) I nkomu
[Tuareg, see Tamashek]
Tugalug (Philippines) Salamot
Tukang Besi (Indonesia) Tarima kasi
Tulu (India) [thank you very much] Mast upakara
Tupi [Tembé Tenetéhar] (Brazil) [by men] Azéharamopa
Tupi [Tembé Tenetéhar] (Brazil) [by men] Azéharamo kui
Tupi [Tembé Tenetéhar] (Brazil) [by men] Azéharmo kui
Tupi [Tembé Tenetéhar] (Brazil) [by men] Azéharamo aypopa
Tupi [Tembé Tenetéhar] (Brazil) [by men] Ipopa
Tupi [Tembé Tenetéhar] (Brazil) [by men] Ipo
Tupi [Tembé Tenetéhar] (Brazil) [by women] Azéharamo aypo-mia
Turkish (Turkey, Northern Cyprus) Tesekkür ederim
Turkish (Turkey, Northern Cyprus) Tesekkurler
Turkish (Turkey, Northern Cyprus) Mersi
Turkish (Turkey, N. Cyprus) [informal] Sagol
Turkish (Turkey, N. Cyprus) [formal] Sagolun
Turkish (Turkey, N. Cyprus) [very much] Çok tesekkür ederim
Turkish (Turkey, N. Cyprus) [very much] Çok sagolun
Turkmen (Turkmenistan) Sag bol
Turkmen (Turkmenistan) Sag bolung
Turkmen (Turkmenistan) Tangur
Tuscarora [Southern Band] (N.Carolina USA) Nyeahweh
Tuvaluan (Tuvalu) Fakafetai
Tuvan (Russia) Chettirdim
Tzeltal (Chiapas Mexico) Jocolawal
Tzeltal (Chiapas Mexico) Wokolawal
Tzotzil (Chiapas Mexico) Kolaval
Tzotzil (Chiapas Mexico) Kolawal
Tzotzil (Chiapas Mexico) [very much] Batz'i kolaval
Tzotzil (Chiapas Mexico) Ois botik

Uchinaaguchi (Okinawa Japan) Nihei deebiru
Uchinaaguchi (Okinawa Japan) Ippe nihei deebiru
Uchinaaguchi [Shuri] (Okinawa Japan) Nifee deebiru
Udmurt (Russia) Tau
Ukrainian (Ukraine) Dyakooyu
Ukrainian (Ukraine) Spasibi
Unagan (Alaska) Qagaasakung
Unagan (Alaska) Qaqaasakuq
Urdu (India, Pakistan) Shukriya

Sub-string of a string

[Displaying first five char here stringh is vikassharma]
[root@vikas java]# echo vikassharma | awk '{print substr($0,1,5)}'
vikas
[root@vikas java]# echo vikassharma | cut -c1-5
vikas
[root@vikas java]# printf "%.5s\n" "vikassharma"
vikas
[root@vikas java]# echo vikassharma | sed 's/\(.\{5\}\).*/\1/'
vikas
[root@vikas java]# var=vikassharma
[root@vikas java]# printf "%.5s\n" "$var"
vikas
[root@vikas java]# echo "${var%${var#?????}}"
vikas
[root@vikas java]#

[root@vikas java]# echo vikassharma | cut -c6-
sharma
[root@vikas java]# echo vikassharma | awk '{print substr($0,6)}'
sharma
[root@vikas java]# var=vikassharma
[root@vikas java]# echo ${var:5}
sharma
[root@vikas java]# echo "${var#?????}"
sharma

Sub-string of a string

[Displaying first five char here stringh is vikassharma]
[root@vikas java]# echo vikassharma | awk '{print substr($0,1,5)}'
vikas
[root@vikas java]# echo vikassharma | cut -c1-5
vikas
[root@vikas java]# printf "%.5s\n" "vikassharma"
vikas
[root@vikas java]# echo vikassharma | sed 's/\(.\{5\}\).*/\1/'
vikas
[root@vikas java]# var=vikassharma
[root@vikas java]# printf "%.5s\n" "$var"
vikas
[root@vikas java]# echo "${var%${var#?????}}"
vikas
[root@vikas java]#

[root@vikas java]# echo vikassharma | cut -c6-
sharma
[root@vikas java]# echo vikassharma | awk '{print substr($0,6)}'
sharma
[root@vikas java]# var=vikassharma
[root@vikas java]# echo ${var:5}
sharma
[root@vikas java]# echo "${var#?????}"
sharma

Finding files not containg the pattern

[Will list the files that does not contains the word in the current directory]
find . -type f \! -exec grep -q "word" {} \; -print

find . -type f | while read file
do
grep "word" $file > /dev/null
[ $? -ne 0 ] && echo $file
done

[List of all files in the current dir]
find . -type f

find . -type f | xargs grep -lv "word"

[List files containing the word]
find . -type f -exec grep -q "void" {} \; -print

[List files and all occurrence of word ]

grep -r "void" .

Finding files not containg the pattern

[Will list the files that does not contains the word in the current directory]
find . -type f \! -exec grep -q "word" {} \; -print

find . -type f | while read file
do
grep "word" $file > /dev/null
[ $? -ne 0 ] && echo $file
done

[List of all files in the current dir]
find . -type f

find . -type f | xargs grep -lv "word"

[List files containing the word]
find . -type f -exec grep -q "void" {} \; -print

[List files and all occurrence of word ]

grep -r "void" .

Friday, February 20, 2009

Size command -- information about a binary file

The size [/path/to/binary] command gives the segment sizes of a binary executable or archive file. This is mainly of use to programmers.

[root@vikas s_w]# size /root/Desktop/current_task/sharedmem_c/a.out
text data bss dec hex filename
1254 260 8 1522 5f2 /root/Desktop/current_task/sharedmem_c/a.out
[root@vikas s_w]#

Size command -- information about a binary file

The size [/path/to/binary] command gives the segment sizes of a binary executable or archive file. This is mainly of use to programmers.

[root@vikas s_w]# size /root/Desktop/current_task/sharedmem_c/a.out
text data bss dec hex filename
1254 260 8 1522 5f2 /root/Desktop/current_task/sharedmem_c/a.out
[root@vikas s_w]#

nm command List symbols from binary file

[root@vikas sharedmem_c]# whatis nm
nm (1) - list symbols from object files
nm (1p) - write the name list of an object file (DEVELOPMENT)
nm-tool (1) - utility to report NetworkManager state

List symbols in an unstripped compiled binary.

[root@vikas sharedmem_c]#
[root@vikas sharedmem_c]# nm b.out
08049678 d _DYNAMIC
08049744 d _GLOBAL_OFFSET_TABLE_
080485d8 R _IO_stdin_used
w _Jv_RegisterClasses
08049668 d __CTOR_END__
08049664 d __CTOR_LIST__
08049670 D __DTOR_END__
0804966c d __DTOR_LIST__
08048660 r __FRAME_END__
08049674 d __JCR_END__
08049674 d __JCR_LIST__
0804976c A __bss_start
08049768 D __data_start
08048590 t __do_global_ctors_aux
080483d0 t __do_global_dtors_aux
080485dc R __dso_handle
w __gmon_start__
08048589 T __i686.get_pc_thunk.bx
08049664 d __init_array_end
08049664 d __init_array_start
08048510 T __libc_csu_fini
08048520 T __libc_csu_init
U __libc_start_main@@GLIBC_2.0
0804976c A _edata
08049774 A _end
080485b8 T _fini
080485d4 R _fp_hw
080482f8 T _init
08048380 T _start
080483a4 t call_gmon_start
08049770 b completed.5645
08049768 W data_start
0804976c b dtor_idx.5647
08048430 t frame_dummy
08048454 T main
U perror@@GLIBC_2.0
U putchar@@GLIBC_2.0
U shmat@@GLIBC_2.0
U shmget@@GLIBC_2.0
[root@vikas sharedmem_c]#

nm command List symbols from binary file

[root@vikas sharedmem_c]# whatis nm
nm (1) - list symbols from object files
nm (1p) - write the name list of an object file (DEVELOPMENT)
nm-tool (1) - utility to report NetworkManager state

List symbols in an unstripped compiled binary.

[root@vikas sharedmem_c]#
[root@vikas sharedmem_c]# nm b.out
08049678 d _DYNAMIC
08049744 d _GLOBAL_OFFSET_TABLE_
080485d8 R _IO_stdin_used
w _Jv_RegisterClasses
08049668 d __CTOR_END__
08049664 d __CTOR_LIST__
08049670 D __DTOR_END__
0804966c d __DTOR_LIST__
08048660 r __FRAME_END__
08049674 d __JCR_END__
08049674 d __JCR_LIST__
0804976c A __bss_start
08049768 D __data_start
08048590 t __do_global_ctors_aux
080483d0 t __do_global_dtors_aux
080485dc R __dso_handle
w __gmon_start__
08048589 T __i686.get_pc_thunk.bx
08049664 d __init_array_end
08049664 d __init_array_start
08048510 T __libc_csu_fini
08048520 T __libc_csu_init
U __libc_start_main@@GLIBC_2.0
0804976c A _edata
08049774 A _end
080485b8 T _fini
080485d4 R _fp_hw
080482f8 T _init
08048380 T _start
080483a4 t call_gmon_start
08049770 b completed.5645
08049768 W data_start
0804976c b dtor_idx.5647
08048430 t frame_dummy
08048454 T main
U perror@@GLIBC_2.0
U putchar@@GLIBC_2.0
U shmat@@GLIBC_2.0
U shmget@@GLIBC_2.0
[root@vikas sharedmem_c]#

Changes all filenames in currnet dir to lowercase

#!/bin/bash
for filename in * ; do
filen=`basename $filename`
n=`echo $filen | tr A-Z a-z` # tr a-z A-Z lowercase to upper
if [ "$filen" != "$n" ]
then
mv $filen $n
echo "File $filen renamed as $n"
fi
done

Changes all filenames in currnet dir to lowercase

#!/bin/bash
for filename in * ; do
filen=`basename $filename`
n=`echo $filen | tr A-Z a-z` # tr a-z A-Z lowercase to upper
if [ "$filen" != "$n" ]
then
mv $filen $n
echo "File $filen renamed as $n"
fi
done

A weak but useful encryption using TR

[encrypt]
echo "vikas6@" | tr 'a-zA-Z0-9@_' 'j-za-iJ-ZA-I5-90-4*@'

[decrypt just reverse]
echo "ertjb1*" | tr 'j-za-iJ-ZA-I5-90-4*@' 'a-zA-Z0-9@_'

A weak but useful encryption using TR

[encrypt]
echo "vikas6@" | tr 'a-zA-Z0-9@_' 'j-za-iJ-ZA-I5-90-4*@'

[decrypt just reverse]
echo "ertjb1*" | tr 'j-za-iJ-ZA-I5-90-4*@' 'a-zA-Z0-9@_'

Type command -- tell you about other command

whatis type
type (1p) - write a description of command type
type [builtins] (1) - bash built-in commands, see bash(1)
[root@vikas 18-feb]# type ls
ls is aliased to `ls --color=tty'
[root@vikas 18-feb]# type dir
dir is /usr/bin/dir
[root@vikas 18-feb]# type banner
banner is /usr/bin/banner
[root@vikas 18-feb]# type rm
rm is aliased to `rm -i'
[root@vikas 18-feb]# type rmdir
rmdir is /bin/rmdir
[root@vikas 18-feb]# type [
[ is a shell builtin

type -a ls

It works some what like which, but bash builtin.

Type command -- tell you about other command

whatis type
type (1p) - write a description of command type
type [builtins] (1) - bash built-in commands, see bash(1)
[root@vikas 18-feb]# type ls
ls is aliased to `ls --color=tty'
[root@vikas 18-feb]# type dir
dir is /usr/bin/dir
[root@vikas 18-feb]# type banner
banner is /usr/bin/banner
[root@vikas 18-feb]# type rm
rm is aliased to `rm -i'
[root@vikas 18-feb]# type rmdir
rmdir is /bin/rmdir
[root@vikas 18-feb]# type [
[ is a shell builtin

type -a ls

It works some what like which, but bash builtin.

User list currenly logged in.

[root@vikas 18-feb]# whatis users
users (1) - print the user names of users currently logged in to the current host
[root@vikas 18-feb]# users
root root root root root

[root@vikas 18-feb]# who
root tty7 2009-02-20 10:01 (:0)
root pts/0 2009-02-20 10:38 (:0.0)
root pts/1 2009-02-20 16:20 (:0.0)
root pts/3 2009-02-20 15:46 (192.168.4.141)
root pts/4 2009-02-20 15:51 (192.168.4.141)
[root@vikas 18-feb]# who -q
root root root root root
# users=5
[root@vikas 18-feb]#

User list currenly logged in.

[root@vikas 18-feb]# whatis users
users (1) - print the user names of users currently logged in to the current host
[root@vikas 18-feb]# users
root root root root root

[root@vikas 18-feb]# who
root tty7 2009-02-20 10:01 (:0)
root pts/0 2009-02-20 10:38 (:0.0)
root pts/1 2009-02-20 16:20 (:0.0)
root pts/3 2009-02-20 15:46 (192.168.4.141)
root pts/4 2009-02-20 15:51 (192.168.4.141)
[root@vikas 18-feb]# who -q
root root root root root
# users=5
[root@vikas 18-feb]#

Instaling RPM by extracting it. If does not installled using rpm -i

whatis rpm2cpio
rpm2cpio (8) - Extract cpio archive from RPM Package Manager (RPM) package


whatis cpio
cpio (1) - copy files to and from archives
cpio.h [cpio] (0p) - cpio archive values
cpio (rpm) - A GNU archiving program.


e.g

rpm2cpio banner-1.3.1-5.fc8.i386.rpm | cpio -idmv

cd usr/bin/

./banner

This will exract files from rpm and copy to the required place. As above eg. copy the banner binary to /usr/bin

-d, --make-directories Create leading directories where needed
-i, --extract Extract files from an archive (run in copy-in
mode)
-m, --preserve-modification-time
Retain previous file modification times when
creating files
-v, --verbose Verbosely list the files processed

Instaling RPM by extracting it. If does not installled using rpm -i

whatis rpm2cpio
rpm2cpio (8) - Extract cpio archive from RPM Package Manager (RPM) package


whatis cpio
cpio (1) - copy files to and from archives
cpio.h [cpio] (0p) - cpio archive values
cpio (rpm) - A GNU archiving program.


e.g

rpm2cpio banner-1.3.1-5.fc8.i386.rpm | cpio -idmv

cd usr/bin/

./banner

This will exract files from rpm and copy to the required place. As above eg. copy the banner binary to /usr/bin

-d, --make-directories Create leading directories where needed
-i, --extract Extract files from an archive (run in copy-in
mode)
-m, --preserve-modification-time
Retain previous file modification times when
creating files
-v, --verbose Verbosely list the files processed

How to know user identity.

id
id (1p) - return user identity
id (1) - print user identity

root id is 0
id -u return 0 then u r root else not.

e.g
[root@vikas 18-feb]# id -u
0
[root@vikas 18-feb]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@vikas 18-feb]# su vikas
[vikas@vikas 18-feb]$ id
uid=500(vikas) gid=500(vikas) groups=500(vikas)
[vikas@vikas 18-feb]$ id -u
500
[vikas@vikas 18-feb]$ su

if [ `id -u` = "0" ] ; then
echo "u r root"
else
echo " u r not root"
fi

How to know user identity.

id
id (1p) - return user identity
id (1) - print user identity

root id is 0
id -u return 0 then u r root else not.

e.g
[root@vikas 18-feb]# id -u
0
[root@vikas 18-feb]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@vikas 18-feb]# su vikas
[vikas@vikas 18-feb]$ id
uid=500(vikas) gid=500(vikas) groups=500(vikas)
[vikas@vikas 18-feb]$ id -u
500
[vikas@vikas 18-feb]$ su

if [ `id -u` = "0" ] ; then
echo "u r root"
else
echo " u r not root"
fi

Thursday, February 19, 2009

Message prompts on when somebody logins using ssh /etc/motd

edit /etc/motd

Whatever you write in this file, displays when somebody, logins using ssh in your system.

e.g

[root@localhost ~]# ssh 192.168.4.13
root@192.168.4.13's password:
Last login: Wed Feb 18 17:44:44 2009 from 192.168.4.141
*****************************************
* *
* Vikas Sharma *
* *
*****************************************

[root@vikas ~]#

Message prompts on when somebody logins using ssh /etc/motd

edit /etc/motd

Whatever you write in this file, displays when somebody, logins using ssh in your system.

e.g

[root@localhost ~]# ssh 192.168.4.13
root@192.168.4.13's password:
Last login: Wed Feb 18 17:44:44 2009 from 192.168.4.141
*****************************************
* *
* Vikas Sharma *
* *
*****************************************

[root@vikas ~]#

Banner command

banner

banner [option] [characters]

Print characters as a poster. If no characters are supplied, banner prompts for them and reads an input line from standard input. By default, the results go to standard output, but they are intended to be sent to a printer.
Option
-w width

Set width to width characters. Note that if your banner is in all lowercase, it will be narrower than width characters. If -w is not specified, the default width is 132. If -w is specified but width is not provided, the default is 80.

e.g

[root@vikas 18-feb]# banner vikas

# # ### # # # #####
# # # # # # # # #
# # # # # # # #
# # # ### # # #####
# # # # # ####### #
# # # # # # # # #
# ### # # # # #####

[root@vikas 18-feb]#

Banner command

banner

banner [option] [characters]

Print characters as a poster. If no characters are supplied, banner prompts for them and reads an input line from standard input. By default, the results go to standard output, but they are intended to be sent to a printer.
Option
-w width

Set width to width characters. Note that if your banner is in all lowercase, it will be narrower than width characters. If -w is not specified, the default width is 132. If -w is specified but width is not provided, the default is 80.

e.g

[root@vikas 18-feb]# banner vikas

# # ### # # # #####
# # # # # # # # #
# # # # # # # #
# # # ### # # #####
# # # # # ####### #
# # # # # # # # #
# ### # # # # #####

[root@vikas 18-feb]#

How to make pdf of the manual page of commands

[show manual page of the command]
man commnd

[man page to pdf (nice way)]
man -t command | ps2pdf - > command.pdf

How to make pdf of the manual page of commands

[show manual page of the command]
man commnd

[man page to pdf (nice way)]
man -t command | ps2pdf - > command.pdf

lsof utility

whatis lsof
lsof (8) - list open files
lsof (rpm) - A utility which lists open files on a Linux/UNIX system

lsof
lsof | grep TCP
lsof -i TCP
lsof | grep 'root' | awk '{print $NF}' | sort | uniq | wc -l

lsof utility

whatis lsof
lsof (8) - list open files
lsof (rpm) - A utility which lists open files on a Linux/UNIX system

lsof
lsof | grep TCP
lsof -i TCP
lsof | grep 'root' | awk '{print $NF}' | sort | uniq | wc -l

nohup - countine a job or command even after logoff

whatis nohup
nohup (1p) - invoke a utility immune to hangups
nohup (1) - run a command immune to hangups, with output to a non-tty

nohup

Keeps a command running even after user logs off. The command will run as a foreground process unless followed by &. If you use nohup within a script, consider coupling it with a wait to avoid creating an orphan or zombie process.

nohup command args

nohup - countine a job or command even after logoff

whatis nohup
nohup (1p) - invoke a utility immune to hangups
nohup (1) - run a command immune to hangups, with output to a non-tty

nohup

Keeps a command running even after user logs off. The command will run as a foreground process unless followed by &. If you use nohup within a script, consider coupling it with a wait to avoid creating an orphan or zombie process.

nohup command args

Wednesday, February 18, 2009

Error redirecting /dev/null

/dev/null or the null device is a special file that discards all data written to it.
/dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket),

commaned > /dev/null 2>&1 or /dev/null 2>/dev/null

The greater-thans (>) in commands like these redirect the program’s output somewhere. In this case, something is being redirected into /dev/null, and something is being redirected into &1.

There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.

Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.

Error redirecting /dev/null

/dev/null or the null device is a special file that discards all data written to it.
/dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket),

commaned > /dev/null 2>&1 or /dev/null 2>/dev/null

The greater-thans (>) in commands like these redirect the program’s output somewhere. In this case, something is being redirected into /dev/null, and something is being redirected into &1.

There are three standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT, and STDERR.

Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.

Steps to make sipx installation cd with centos (command line)


This document is about how to create a single boot CD installation for sipX. It is based on CentOS and we are using the kickstart technology included with CentOS and Fedora to script the Anaconda installer. In addition to creating an automated install, this document also describes how to create a custom distribution of CentOS that includes only the needed RPMs including the sipX RPMs and all necessary dependencies. The distribution fits on one CD and is self-contained resolving all its dependencies. No network connection is required to install it.

2. Installing Necessary Tools


The scripts required to perform all the necessary operations are part of the CentOS / Fedora distribution.


  • yum install anaconda-runtime createrepo yum-utils anaconda anaconda-help busybox-anaconda mkisofs



  • yum install system-config-kickstart




    1. Create a Working Copy of the CentOS Installation Disk



We are using CentOS 4 to start with. Only CD 1 is required as we are interested in a customized minimal installation. Mount the CD and copy its content to a working directory:


  • mkdir centos-cd1 cd1



  • sudo mount /dev/cdrom centos-cd1



  • rsync -a centos-cd1/* cd1



  • cp centos-cd1/.discinfo cd1



  • sudo umount centos-cd1




    1. Create a Kickstart Configuration File - ks.cfg



The most important file is the kickstart configuration file (ks.cfg). This file has to be copied to the root directory of the new CD. It provides all the parameters to Anaconda for an automated installation, determines what packages to install and allows some post installation scripts to be executed.

Save as File: ks.cfg
####################################################
### Kickstart configuration file
### for sipXecs distribution CDs
###
##################################################

#--- Installation method (install, no upgrade) and source (CD-ROM)
install
cdrom

#--- Debugging (uncomment next line to debug in the interactive mode)
#interactive
#--- Language and input support
lang en_US.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8
keyboard us
mouse generic3ps/2

#--- X-Windows (use "skipx" directive to skip X-Windows configuration)
skipx

#--- Network configuration
# Add some default or else Anaconda will pop a window and ask
network --device eth0 --bootproto static --ip 192.168.5.176 --netmask 255.255.255.0 --gateway 192.168.5.1 --nameserver 192.168.5.145 --hostname sipx.example.com

#--- Authentication and security
rootpw setup
firewall --disabled
selinux --disabled
authconfig --enableshadow --enablemd5

#--- Time zone
timezone America/New_York

#--- Boot loader
bootloader --location=mbr



#--- Partitioning
# The user will be prompeted to perform this step
#--- Reboot the host after installation is done
reboot

#--- Package selection
%packages --resolvedeps
e2fsprogs
grub
kernel
ntp
dhcp
bind
caching-nameserver
gdb
strace

# Used for SF build
sipxpbx
sipxconfig
sipxacd
sipxconfig-agent
sipxconfig-report
sipxvxml
sipxproxy
sipxregistry
sipxpublisher
sipxproxy-cdr
sipxconfig-tftp
sipxconfig-ftp
sipxtools

#--- Post-installation script
%post

#!/bin/sh


#...Mount the installation CD
/sbin/start_udev
/sbin/chkconfig --del smartd &> /dev/null
mkdir /tempdir
mount /dev/cdrom /tempdir

#...Setup initial setup script to run one time (after initial reboot only)
echo -e "\n/usr/bin/sipx_reset_cd\n" >> /root/.bashrc

# the script removes itself from the root .bashrc file when it completes
#...Place a copy of the RAID restore script in /sbin
cp /tempdir/restore-raid-drive /sbin/restore-raid-drive
chmod u=rwx /sbin/restore-raid-drive

#... Add logon message
echo -e "\nWelcome to Coral IPPBX\n" >> /etc/issue
echo -e "=============================\n" >> /etc/issue
echo -e "\nFirst time logon: user = root password = setup\n\n" >> /etc/issue

#... Boot kernel in quiet mode
sed -i 's/ro root/ro quiet root/g' /boot/grub/grub.conf

# Install SIPfoundry sipX repository and key
rpm --import /tempdir/RPM-GPG-KEY-sipX
cp /tempdir/sipx-fc.repo /etc/yum.repos.d

#...Install new splash image
cp /tempdir/splash.xpm.gz /boot/grub

#... Prevent it from being overwritten when upgrading the system using yum update
chmod 444 /boot/grub/splash.xpm.gz

#...Prevent sipxpbx from starting after first reboot as it is not yet configured
chkconfig sipxpbx off

# Postgresql will be started by sipxpbx
chkconfig postgresql off


# Turn off unused services that listen on ports
chkconfig portmap off
chkconfig netfs off
chkconfig nfslock off

# Make a backup copy of the CD if there is a /recovery partition
if test -d "/recovery" ; then
mkdir /recovery/linux
cp -a /tempdir/* /recovery/linux
cp -a /tempdir/.discinfo /recovery/linux
fi
umount /tempdir
rm -rf /tempdir
eject


Note: Make sure to use the i586 kernel. Also, the process cpu speed needs to be stopped and disabled (/sbin/service cpuspeed stop & chkconfig cpuspeed off). Otherwise the VIA C3 system will crash anytime cpuspeed tries to throttle the CPU back.

2.3 Creating a Custom Installer


Next we want to create a custom installer including our own splash screen and boot options. The file isolinux.cfg tells the grub bootloader where to look for the kernel. It should be familiar to you as it is identical to the common grub/grub.conf file.

File: cd1/isolinux/isolinux.cfg
default coraltele
prompt 1
timeout 0
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
kernel vmlinuz

append initrd=initrd.img ramdisk_size=8192
label memtest86
kernel memtest
append -
label coraltele
kernel vmlinuz
append initrd=initrd.img ramdisk_size=8192 ks=cdrom:/ks.cfg quiet

The file isolinux.cfg specifies that the splash screen to be displayed before starting the boot process is called boot.msg:

File: cd1/isolinux/boot.msg
^L
^Xsplash.lss

Press to start the installation.

WARNING: All data will be erased and the disk is formatted.
-----------------------------------------------------------
Root password is "coraltele".
^O02[F1-Main] [F2-Options] [F3-General] [F4-Kernel]^O07

Note: Adapt the other files options.mgs, general.msg, param.msg to your liking.

2.4 Changing the splash.lss File


The cd1/isolinux/splash.lss file is the splash file that displays in the very first screen after the machine restarts and presents the user with the boot options. This file is in the directory /isolinux. An excellent description of how to do this is given below:

First Step: Create an image file of the format 640 x 220 pixels using The Gimp. Downsample the color depth to 14 colors. This is done in GIMP by going to ->Image->Mode - select "indexed". Then save the file in the PPM format in RAW mode.
Second Step: The created .PPM file needs to be edited. Using an editor open the file and remove the 2nd line where it says that GIMP created this file. The next step does not handle comments in PPM files.
Third Step: Using ppmtolss16 convert the file to .lss
./ppmtolss16 '#c0cfc0=7' splash.lss

Fourth Step: Copy the file splash.lss to the /isolinux directory.
Changing the Splash Image displayed by Grub (splash.xpm.gz)
Start the GIMP.


  • Click on File->New or type Ctrl+N



  • In the new image dialog, change Width to 640 pixels and Height to 480 pixels. (The image should be of size 640x480 pixels.) Now click OK.



  • Create the image which you would like to be the splash image. It's quite fun to experiment with the various tools of the GIMP!



  • After you have finished creating the image, hit Alt+i or right click on the image and click on Image->Mode->Indexed...



  • In the Indexed Color Conversion dialog that appears, click on the radio button "Generate optimal Palette" and in "# of colors" enter 14. Click OK.(The image should be of only 14 colors)



  • Now right-click on the image and click on File->Save As...Save the file as splash.xpm in a directory of your choice.



  • Now open a terminal window and navigate to the directory where you have saved splash.xpm



  • Now key in gzip splash.xpm



  • You will find that a file named splash.xpm.gz is created in the directory where splash.xpm used to exist.



  • Copy this splash.xpm.gz to the /boot/grub directory. You may want to back up the pre-existing splash.xpm.gz file in the /boot/grub directory first.



    1. Customizing Anaconda



Anaconda is the program that provides all the installation services and displays all the graphics during the installation process. It is included in the directory cd1/CentOS/base in a file called stage2.img. An excellent explanation of how to edit this image manually can be found below:

The following describes a crude way of changing the artwork used by Anadonca during the installation process. They cleaner way would be to use buildinstall to create a new installer. In this case we start with an existing installer and modify it.

The image of the Anaconda installer can be found in cd1/CentOS/base. The image file is called stage2.img. We will now mount this image so that we can look inside.


  • mkdir ~/anaconda



  • mount -o loop cd1/CentOS/base/stage2.img ~/anaconda


Now we need to copy the contents to a directory where we can alter the files. A simple cp command was claimed to not work because of some hard links included in the image. For this reason we use tar to package the contents of the directory and then untarred them where we could work on them.



  • cd ~/anaconda



  • tar -cvf ~/stage2.tar .



  • cd ~



  • mkdir stage2



  • cd stage2



  • tar -xvf ../stage2.tar


Now we can alter the images used by the installer located in usr/share/anaconda/pixmaps and the images used in the installation slideshow in usr/share/anaconda/pixmaps/rnotes. You can also edit the text in the left sidebar, which is in HTML format, in usr/share/anaconda/help/[locale].





After you've made the desired modifications, we need to compress this information back into an .img file.


  • cd ~



  • mkcramfs stage2/ stage2.img.new


Then, copy the altered stage2.img to the CentOS/base directory.


  • cp stage2.img.new cd1/CentOS/base/stage2.img



3. Choose the appropriate RPMs to be in CentOS/RPMS




It involves selecting a set if RPMS that comprise all the necessary elements for Linux to install and boot. In addition it requires all the RPMS required for a sipX system. In addition, all the dependencies have to be resolved. And lastly, its size must not exceed what can fit onto a single CD.
We started with the first CD of the CentOs 4 distribution. The list of RPMs we deleted is long.
In addition, it is possible to update the RPMs to their latest patch level which makes it unnecessary to run yum update after the system is installed.

3.1 Test if all dependencies for all the RPMs in CentOS/RPMS are resolved


The following test is absolutely crucial. Inevitably once you start removing or adding RPMs to the repository, you will have to make sure that all dependencies are resolved properly. Once the test below passes, you have succeeded to create a self-contained repository that will install properly.


  • cd ~



  • mkdir testdb



  • rpm --initdb --dbpath $PWD/testdb



  • rpm --test --dbpath $PWD/testdb -Uvh cd1/CentOS/RPMS/*.rpm




    1. Create repodata using createrepo





  • cd cd1



  • createrepo --baseurl="media://1142383043.889895" -g CentOS/base/comps.xml CentOS/RPMS/


Note: Make sure the number in --baseurl corresponds to the first line in the file cd1/.discinfo. Should you have trouble with this command try using absolute path names.

3.3 Create hdlist and hdlist2




  • cd cd1



  • export PYTHONPATH=/usr/lib/anaconda



  • export PATH="$PATH:/usr/lib/anaconda-runtime"



# Write CentOS/base/hdlist and hdlist2:


  • genhdlist --hdlist /home/test/cd1/CentOS/base/hdlist --productpath CentOS /home/test/cd1


Note: Absolute path names are required for the command genhdlist to work properly.

3.4 Create a Package Order File


The package order determines the order by which RPMs are installed by Anaconda. This order matters as RPMs only install if all the required dependencies are already installed on the system. The command pkgorder in a recursive process calculates the correct package order.


  • cd cd1



  • pkgorder /home/test/cd1 i386 CentOS > /home/test/cd1/pkgorder.txt


Run genhdlist again, this time with package order. Now that we have the proper package order calculated we can create the final hdlist files for Anaconda to use:


  • genhdlist --withnumbers --fileorder /home/test/cd1/pkgorder.txt \

--hdlist /home/test/cd1/CentOS/base/hdlist --productpath CentOS /home/test/cd1

4. Create the ISO Image



  • cd ~



  • mkisofs -R -J -T -no-emul-boot -boot-load-size 4 -boot-info-table -V "sipX 3.4" \

-A "Created on 8/6/2006" -P "SIPfoundry" -p "SIPfoundry" -b isolinux/isolinux.bin \
-c isolinux/boot.cat -x "lost+found" -o sipx.iso cd1