Upload and download files to the local machine in Xshell (the folder in the dbserver that has been logged on through ssh for multiple times in linux) 1. List all sh files to be copied-bash-4.1 $ ll/mysqllog/osw /*. sh-rwxr-xr-x 1 mysql 409 May 16/mysqllog/osw/topaix. sh-rwxr-xr-x 1 mysql 127 May 16/mysqllog/osw/tarupfiles. sh-rwxr-xr-x 1 mysql 556 May 16/mysqllog/osw/stopOSW. sh-rwxr-xr-x 1 mysql 1609 May 16/mysqllog/osw/startOSW. sh-rwxr-xr-x 1 mysql 398 May 16 10: 00/mysqllog/osw/oswsub. sh-rwxr-xr-x 1 mysql 330 May 16/mysqllog/osw/oswnet. sh-rwxr-xr-x 1 mysql 636 May 16/mysqllog/osw/oswlnxtop. sh-rwxr-xr-x 1 mysql 634 May 16/mysqllog/osw/oswlnxio. sh-rwxr-xr-x 1 mysql 15598 May 16/mysqllog/osw/OSWatcher. sh-rwxr-xr-x 1 mysql 5586 May 16/mysqllog/osw/OSWatcherFM. sh-rwxr -- r -- 1 mysql 567 May 16/mysqllog/osw/mysql_status.sh-rwxr -- r -- 1 mysql 617 May 16/mysqllog/osw/mysql. sh-rwxr -- r -- 1 mysql 587 May 16/mysqllog/osw/mysql_inno_status.sh 2 copy sh from the remote db server to the directory of the novamysqladminprod account on the control machine: 2.1 enter the osw directory and copysh file cd/home/novamysqladminprod/cacti/oswscp eanprdnucmydbc027db01.eao.abn-iad.ea.com:/mysqllog/osw /*. sh. /cp */tmp/osw/2.2 Exit control Machine [novamysqladmi Nprod @ mydbctl osw] $ exitlogout [chm @ mydbctl osw] $ exitlogout [chm @ linuxbh1-p osw] $ scp mydbctl.eao.abn-iad.ea.com:/tmp/osw/*/tmp/oswPassword: mysql_inno_status.sh 100% 587 0.6KB/s mysql. sh 100% 617 0.6KB/s mysql_status.sh 100% 567 0.6KB/s OSWatcherFM. sh 100% 5586 5.5KB/s OSWatcher. sh 100% 15KB 15.2KB/s oswlnxio. sh 100% 634 0.6KB/s oswlnxtop. sh 100% 636 0.6KB/s 00: 00 oswnet. sh 100% 330 0.3KB/s oswsub. sh 100% 398 0.4KB/s startOSW. sh 100% 1609 1.6KB/s stopOSW. sh 100% 556 kb/s tarupfiles. sh 100% 127 0.1KB/s topaix. sh 100% 409 0.4KB/s 00:00 2.3 check sh files in linuxbh servers [chm @ linuxbh1-p osw] $ pwd/tmp/osw [chm @ linuxbh1-p osw] $ lltotal 68-rwxr -- r -- 1 chm chm 587 Sep 2 mysql_inno_status.sh-rwxr -- r -- 1 chm 617 Sep 2 Mysql. sh-rwxr -- r -- 1 chm 567 Sep 2 08:06 mysql_status.sh-rwxr-xr-x 1 chm 5586 Sep 2 08:06 OSWatcherFM. sh-rwxr-xr-x 1 chm 15598 Sep 2 08:06 OSWatcher. sh-rwxr-xr-x 1 chm 634 Sep 2 08:06 oswlnxio. sh-rwxr-xr-x 1 chm 636 Sep 2 08:06 oswlnxtop. sh-rwxr-xr-x 1 chm 330 Sep 2 08:06 oswnet. sh-rwxr-xr-x 1 chm 398 Sep 2 08:06 oswsub. sh-rwxr-xr-x 1 chm 1609 Sep 2 08:06 star TOSW. sh-rwxr-xr-x 1 chm 556 Sep 2 08:06 stopOSW. sh-rwxr-xr-x 1 chm 127 Sep 2 08:06 tarupfiles. sh-rwxr-xr-x 1 chm 409 Sep 2 08:06 topaix. sh [chm @ linuxbh1-p osw] $ it is OK, all the sh files are here. 3 copy the sh files to local pc D: \ osw \ google get the following help information: XShell file upload and download command sz, rzsz test. log download file name is test. log to the local rz to upload files to the remote server rz-y to overwrite existing files. Here I need to use the sz Command, as shown in: Go to the local check sh file and download it.