Upload and download files in Xshell to the local (linux ssh to log in from multiple dbserver inside the folder)

Upload and download files in Xshell to the local (linux ssh to log in from multiple dbserver inside the folder)

1 lists all the required copy of the file sh

-bash-4.1$ ll /mysqllog/osw/*.sh
-rwxr-xr-x 1 mysql mysql   409 May 16 10:00 /mysqllog/osw/topaix.sh
-rwxr-xr-x 1 mysql mysql   127 May 16 10:00 /mysqllog/osw/tarupfiles.sh
-rwxr-xr-x 1 mysql mysql   556 May 16 10:00 /mysqllog/osw/stopOSW.sh
-rwxr-xr-x 1 mysql mysql  1609 May 16 10:00 /mysqllog/osw/startOSW.sh
-rwxr-xr-x 1 mysql mysql   398 May 16 10:00 /mysqllog/osw/oswsub.sh
-rwxr-xr-x 1 mysql mysql   330 May 16 10:00 /mysqllog/osw/oswnet.sh
-rwxr-xr-x 1 mysql mysql   636 May 16 10:00 /mysqllog/osw/oswlnxtop.sh
-rwxr-xr-x 1 mysql mysql   634 May 16 10:00 /mysqllog/osw/oswlnxio.sh
-rwxr-xr-x 1 mysql mysql 15598 May 16 10:00 /mysqllog/osw/OSWatcher.sh
XR-X. 1--rwxr MySQL MySQL 5586 On May 16 10:00 /mysqllog/osw/OSWatcherFM.sh
-rwxr - r--. 1 MySQL MySQL On May 16 10:00 567 /mysqllog/osw/mysql_status.sh
-rwxr- On May 617. 1 MySQL MySQL -r-- 16 10:00 /mysqllog/osw/mysql.sh
-rwxr - r--. 1 MySQL MySQL On May 16 10:00 587 /mysqllog/osw/mysql_inno_status.sh



2 from a remote server db the copy sh out under the control of the machine to account directory novamysqladminprod:
2.1 and copysh files into the directory OSW

CD / Home / novamysqladminprod / Cacti / OSW
SCP xxxx027db01.eao.abn-iad.ea.com:/mysqllog/osw/*.sh ./
cp * / tmp / OSW /


2.2 exit control machine
[novamysqladminprod @ mydbctl OSW] $ exit
Zimbabwe Logout
[chm @ mydbctl OSW] $ exit
Zimbabwe Logout
[chm @ linuxbh1-the p-OSW] $ scp mydbctl.eao.abn-iad.ea .com: / tmp / OSW / * / tmp / OSW
Password: 
mysql_inno_status.sh                                                                                                                                         100%  587     0.6KB/s   00:00    
mysql.sh                                                                                                                                                     100%  617     0.6KB/s   00:00    
mysql_status.sh                                                                                                                                              100%  567     0.6KB/s   00:00    
OSWatcherFM.sh                                                                                                                                               100% 5586     5.5KB/s   00:00    
OSWatcher.sh                                                                                                                                                 100%   15KB  15.2KB/s   00:00    
oswlnxio.sh                                                                                                                                                  100%  634     0.6KB/s   00:00    
oswlnxtop.sh                                                                                                                                                 100%  636     0.6KB/s   00:00    
oswnet.sh                                                                                                                                                    100%  330     0.3KB/s   00:00    
oswsub.sh                                                                                                                                                    100%  398     0.4KB/s   00:00    
startOSW.sh                                                                                                                                                  100% 1609     1.6KB/s   00:00    
stopOSW.sh                                                                                                                                                   100%  556     0.5KB/s   00:00    
tarupfiles.sh                                                                                                                                                100%  127     0.1KB/s   00:00    
topaix.sh 100% 409 0.4KB / s 0:00    

 

2.3 check sh files in linuxbh servers

[SHM-p @ linuxbh1 Abou] $ PWD
/ tmp / or
[SHM-p @ linuxbh1 Abou] $ ll
the 68
-rwxr - r-- 1 SHM SHM 587 Sep 2 08:06 mysql_inno_status.sh
-rwxr - r - 1 SHM SHM 617 Sep 2 08:06 mysql.sh
-rwxr - r-- 1 SHM SHM 567 Sep 2 08:06 mysql_status.sh
-rwxr-xr-x 1 SHM SHM 5586 Sep 2 08:06 OSWatcherFM. sh
-rwxr-xr-x 1 SHM SHM 15598 Sep 2 08:06 OSWatcher.sh
-rwxr-xr-x 1 SHM SHM 634 Sep 2 08:06 oswlnxio.sh
-rwxr-xr-x 1 SHM SHM 636 Sep 2 08 : 06 oswlnxtop.sh
-rwxr-xr-x 1 SHM SHM 330 Sep 2 08:06 oswnet.sh
-rwxr-xr-x 1 SHM SHM 398 Sep 2 08:06 oswsub.sh
-rwxr-xr-x 1 SHM SHM 2 Sep 1609 08:06 startOSW.sh
-rwxr-xr-x 1 SHM SHM 556 Sep 2 08:06 stopOSW.sh
XR-X. 1--rwxr CHM CHM On Sep 2 08:06 127 tarupfiles.sh
-rwxr XR-X-409. 1 CHM CHM On Sep 2 08:06 topaix.sh
[CHM-P @ linuxbh1 OSW] $ 
IT IS OK, All SH files are here Wallpaper at the.


3 at the SH Copy files to PC local D: \ OSW \
Google help get the following information:
XShell upload and download files command sz, rz
sz test.log test.log to download a file called local
rz upload files to a remote server
rz -y overwrite an existing file

I need to use here is the sz command, as shown below:

 

Go to local check sh file has been downloaded down.

 

 

 

Guess you like

Origin blog.csdn.net/csdnhsh/article/details/91784723