The following script compresses the local text file and uploads it to the FTP server.Inside a little bit of logic, that is, the text file is uploaded date time. txt form, one day to write a log file, today's files do not upload, only uploadThe old log file.[C-sharp]View PlainCopy
#/bin/sh
suffix= ' Cat Suffix.ini '
now= ' Date +%y%m%d '
Curfile="./$now. txt"
curgzfile="$curfile. tar.gz"
Script: check_log.shMain function: Used to check whether the log file is uploaded to the FTP server, if not uploaded, send an email alarm-------------------#!/bin/bash#autochecklogfilesandnoticebyemail#bycolin#revision on2015-11-03# #Useage: ./check_log.sh/home/upload/#10*** */root/check_log.sh################################ #RUN_LOG = '/var/log/check_log_run_stats.log ' [ !-f${run_log}]touch${run_log}echo
An ftp script for searching and uploading updated files #! /Bin/ksh #################################### ##################### Date: 2012-12-19 # name: swiftftp. sh # decription: Infinite Loop, which is executed once every 1 minute. search for the changes in the current directory... an ftp script for searching and uplo
Use the here document
Copy codeThe Code is as follows :#! /Bin/sh
Ftp-ivn 210.29.28.124 User yun yun2011
LCD/home/veyun
Cd/home/veyun/yhb
Get v
Bye
EOF
Explanation:
-I: Disable interaction prompts during multi-file transmission, so there will be no prompts for users to enter their usernames and passwords.-N: Automatic Logon during initial connection is blocked.-V: Set the ftp command to verbose mod
Use here documentation
Copy Code code as follows:
#!/bin/sh
FTP-IVN 210.29.28.124 User Yun yun2011
Lcd/home/veyun
Cd/home/veyun/yhb
Get V
Bye
Eof
Explain:
-I: Turns off interactive prompts during multiple file transfers, so there's no hint that users can enter user names and passwords
-N: Automatic logon When initial connection is blocked
-V: Set the FTP command to verbose mode so t
use shell script to implement FTP automatic upload and download
1. FTP automatically log in to bulk download files. #从ftp The/home/data on the server to the local/home/databackup#### #!/bin/bashFtp-nOpen 192.168.1.171User Guest 123456BinaryCd/home/dataLcd/home/databackupPromptMget *CloseByeEOF execution, if the er
the machine to the Internet, so you have to remember is the configuration file information, the main: DEVICE, TYPE, ONBOOT, IPADDR, NETMASK, GATEWAY, and BOOTPROR.
Install lftp and use terminal commands to download shared files
Lftp is a remote ftp connection tool in the terminal, which is quite convenient. Here I will teach you how to use lftp to upload and download files. I will explain the ftp inst
How can I use a bat script to return the year, month, and day of yesterday? In fact, it is very troublesome to use bat to write a for to get the year, month, and day of the date, and then write a smallProgramTo calculate the year, month, and day of yesterday. In fact, to enable direct execution of. netCodeGood,. Net datetime. Now. adddays (-1) is yesterday
In fact, powershell will help you answer this question. You can use the rich functions supp
FTP Automatic login bulk download filefrom/home/data on the FTP server 192.168.1.60 to the local/home/databackup directory#!/bin/bashftp-v-N 192.168.1.60User Oracle 123456binaryCd/home/dataLcd/home/databackuppromptMget *ClosebyeeofFTP Auto Login bulk upload fileupload files from the local folder/home/databackup to the/home/data directory of the FTP server 192.168
Tags: this www ase shel path shell. com off mysqld1. Add backupmysqleveryday.sh (vi/data/shell/backupmysqleveryday.sh)#!/bin/sh#this Shell is the user for backup MySQL data everyday#author: www.ieliwb.com#path-configbase_mysql_path=/data/webserver/mysql/mysql_dump_path=/data/mysqlbackup/mnt_back_path=/mnt/web/mysqlbackup/ftp_back_path=mysql_data_backup/#mysql-configMysql_user= "Root"Mysql_pass= "*******"#ftp-configftp_host= "IP"Ftp_user= "********"Ftp
The introduction of the socket is not much to say, the internet can be searched, directly say the script, to achieve the function of FTP server and client,Server-side:Importsocketserverimportcommandsimporttimeclassmysockserver ( Socketserver.baserequesthandler): defhandle (self): print "Gotanewconnfrom",self.client_address whileTrue: NBSP;NBSP;NBSP;CMDNBSP;=NBSP;SELF.REQUEST.RECV (1024x768) ifnotcmd:break
Server more, the site is more and more, always feel not the whole backup heart, and there are several times RM operation errors, resulting in irreparable damage. And most VPS providers are not providing automatic backup functionality or this feature charges slightly higher prices. So it is necessary for me to put this work into practice, and maybe one day it will be used.
Use of the backup space I am using GoDaddy online Storage, the advantage is that my VPS are the United States service provid
We can see that there is a script on the company's server that automatically uploads files to ftp. record and learn. #! /Bin/bashsource ~ /. Bash_profileftp-i-n lt ;! Open10.1.10.10usernamepasswdcdbigdatalcd/home/oracle/tbdatabinmput1.t
We can see that there is a script on the company's server that automatically uploads files to
Server more, the site is more and more, always feel not the whole backup heart, and there are several times RM operation errors, resulting in irreparable damage. And most VPS providers are not providing automatic backup functionality or this feature charges slightly higher prices. So it is necessary for me to put this work into practice, and maybe one day it will be used.
Use of the backup space I am using GoDaddy online Storage, the advantage is that my VPS are the United States service provid
The requirements for this script instance are as follows:
1. The company has public share directory, all employees can read and write, but do not allow the deletion of other employee's files; cannot log on anonymously
2, each department has a shared directory, department managers can read and write, department staff can read;
Non-departmental staff can not access (Caiwu, Renshi, Yewu, Kaifa, Kefu Department, each department has a number of employee
An ftp script for searching and uploading updated files #! /Bin/ksh #################################### ##################### Date: 2012-12-19 # name: swiftftp. sh # decription: an infinite loop, which is executed once every minute. Search for files in the current directory that have been modified for more than 1 minute but not later than #2 minutes, ftp to the
#!/bin/bash ftp -nopen 192.168 . 220.129 user ls TOORBINARYHASHCD /path/to/BACKUPLCD / Path/to/need/backupprompt mkdir ' date + " %y%m%d " ' CD ' Date + %y%m%d " "mput *closebye ! Open line-the host IP to be backed up toUser Line--ls is the username of the host to be backed up, toor the password for the front userBinary lines-Transfer using binary modehash--each 1k size output A # number, can notCD line-the directory to upload the b
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.