惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

博客园 - ringwang

【转】 软件需求分析的工作步骤和流程 【转】软件需求分析方法 大网站安全防护措施解读【转】 互联网金融安全1【转】 python环境下载地址 批处理脚本学习 自动复制部署 苹果系统里面部署ASP.NET 23种设计模式的基本介绍 .NET MVC控制器分离到类库的方法 MYSQL临时表创建索引 【转】MySQL 性能优化的最佳20多条经验分享 【转】ASP.NET MVC IOC 之AutoFac攻略 【转】WCF与Web API 区别(应用场景) windows系统命令服务安装卸载 Mysql字段操作—增加字段、删除字段、修改字段名、修改字段类型(约束条件) 【转】 Oracle异常处理,动态游标 java读取文件批量插入记录 linux vmstat 系统结果说明
使用lftp传输文件的shell脚本
ringwang · 2014-06-13 · via 博客园 - ringwang

学习参考用,需要服务器上安装lftp。

#!/bin/bash
#date
filepath=/usr/hadoop/bigdata/filterurl
filtercount=$(ls $filepath/data/datafilter/*.txt|wc -l)
if [ $filtercount -ge 1 ]; then
        for f in $filepath/data/datafilter/*.txt;
        do
                #echo $f
                if [ -f $f ]; then
                newfile=$(basename $f)
lftp << EOF
open ftp://username:password@ip
put $f -o /cnet/$newfile.writing
mv /cnet/$newfile.writing /cnet/$newfile
close
bye
EOF
                rm -f $f
                fi
        done
fi