Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wanjia
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kino
wanjia
Commits
88301be3
Commit
88301be3
authored
Dec 15, 2020
by
宋朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8c50734f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
upload2Ftp
wanjia_tuomin/data_process/upload2Ftp
+0
-0
upload2Ftp.sh
wanjia_tuomin/data_process/upload2Ftp.sh
+33
-0
No files found.
wanjia_tuomin/data_process/upload2Ftp
deleted
100644 → 0
View file @
8c50734f
wanjia_tuomin/data_process/upload2Ftp.sh
0 → 100644
View file @
88301be3
#!/bin/bash
#SFTP配置信息
#用户名
USER
=
sp
#密码
PASSWORD
=
sp940219sp
#待上传文件根目录
SRCDIR
=
/root
#FTP目录
DESDIR
=
/home/songpeng/testfile
#IP
IP
=
192.168.153.100
#端口
PORT
=
2121
#获取文件
cd
${
SRCDIR
}
;
#目录下的所有文件
#FILES=`ls`
#修改时间在执行时间五分钟之前的xml文件
FILES
=
`
find
${
SRCDIR
}
-name
'*.txt'
`
for
FILE
in
${
FILES
}
do
echo
${
FILE
}
#发送文件 (关键部分)
lftp
-u
${
USER
}
,
${
PASSWORD
}
sftp://
${
IP
}
:
${
PORT
}
<<
EOF
cd
${
DESDIR
}
/
lcd
${
SRCDIR
}
put
${
FILE
}
by
EOF
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment