Thursday 12 July 2012

Ignore tables in MySQLdump

While taking mysqldump  some time error coming like databaseName.tableName crossed.meanwhile time you have to exclude that tables.And you don't want to include  some tables while taking mysqldump.


For that we can use    "--ignore-table=DbName.TableName" infront of  DbName in mysqldump command.see below dump command

mysqldump -ruserName -ppassWord  ----ignore-table=DbName.TableName DbName > DbName.sql

This command exclude which table you need to omit.

You can exclude multiple table also

mysqldump -ruserName -ppassWord --ignore-table=DbName.TableName1 --ignore-table=DbName.TableName2 > database.sql

Example:

mysqldump -rroot -proot  ----ignore-table=TEST.TEST_DATA TEST > TEST.sql



Wednesday 11 July 2012

Secure Coping files over ssh, between Linux, Mac or Windows


scp is secure cp (copy), which means we can copy files across ssh connection. That connection will be securely encrypted.

You can use scp to copy files from or to a remote server. You can also copy files from one remote server to another remote server, without passing traffic through your PC.

You can use scp on Linux, Mac and Windows (using WinSCP).


Copy files from a local computer to  remote computer

"scp fileName username@server:PathToLocate"

Example:
 scp test.zip kumar@192.168.1.1:/home/user/

Copy files from a remote server to your local computer

"scp username@server:FilePathToCopy/fileName  PathToLocate"

Example:
 scp kumar@192.168.1.1:/home/user/test.zip  /home/user/

Copy files from a remote server to another remote computer

"scp UserName1@server1:FilePathToCopy/fileName UserName2@server2:PathToLocate"

Example:
 scp kumar@192.168.1.1:/home/user/test.zip  looser@192.168.1.5:/home/user/

Tuesday 10 July 2012

Zip files via Command in LINUX

we can zip one or more files via command at a time.The command is

 zip -r NameToFile.zip   file1/ file2/

Example:
   zip -r  FilesToDownload.zip  fileName1/ fileName2/

then both  fileName1 and fileName2 converted as FilesToDownload.zip

Monday 9 July 2012

Connecting ubuntu systems via SSH server

We can connect ubuntu systems using openssh-server.It helps to access other system with your system.
For that install openssh-server which system you want to access.

In command you install via below given commands...
                           sudo -apt|get install openssh-server
                            sudo update-rc.d ssh defaults
When I try to connect to the System with SSH using

ssh username@hostname
or
ssh username@ipaddress

Example:
ssh  raja@192.168.1.73