`

linux shell script using ftp to get a file

阅读更多

common is like this:

path="users/jeffyd/Softwares/Opensource/Maven" 
filename="apache-maven-2.2.1-bin.tar.bz2"
hostname="*.*.*.*"
username="***"
password="***"

date
echo Get $filename From $hostname
ftp -vn $hostname <<EOF
user $username $password

cd $path
pwd

binary
get $filename

bye
EOF

 

another is like this:

path=users/jeffyd/Softwares/Opensource/Hudson/
filename="hudson.war"
hostname="*.*.*.*"
username="***"
password="***"


ftp -un $hostname <<EOF
quote USER $username
quote PASS $password

cd $path
get $filename

quit
EOF
0
0
分享到:
评论

相关推荐

    UE(官方下载)

    You can use a combination of a script and tool to create a single file from multiple files. Sum Column/Selection in Column Mode This power tip demonstrates how to calculate the sum from a column of ...

    Linux ftp 远程文件传输.docx

    Linux ftp 远程文件传输是使用 FTP(File Transfer Protocol)协议在 TCP/IP 网络上传输文件的一种方法。FTP 是一种标准的文件传输协议,允许用户传输 ASCII 文件和二进制文件。在 FTP 会话过程中,用户可以通过使用...

    Linux高级bash编程

    A Detailed Introduction to I/O and I/O Redirection F. Standard Command-Line Options G. Important Files H. Important System Directories I. Localization J. History Commands K. A Sample .bashrc File L. ...

    Midnight Commander Win32 port

    o Linux file recovery: If you are using Linux system, you can recover deleted files from an ext2fs partition with the undelete file system. This is a low level file recovery function that will ...

    Python Cookbook, 2nd Edition

    Adapting a File-like Object to a True File Object Recipe 2.16. Walking Directory Trees Recipe 2.17. Swapping One File Extension for Another Throughout a Directory Tree Recipe 2.18. Finding a ...

    Advanced Bash-Scripting Guide <>

    A Detailed Introduction to I/O and I/O Redirection F. Standard Command-Line Options G. Important Files H. Important System Directories I. Localization J. History Commands K. A Sample .bashrc File L. ...

    ftp使用文档

    FTP能够处理文本文件和二进制文件,具备自己的shell环境和一系列命令集,允许用户进行文件传输相关的配置与管理。无论是本地网络还是Internet,FTP都能够轻松实现文件的双向传输,特别适用于从Internet上的FTP站点...

    WinZip Pro 18.5 Build 11111 (x86-x64)+SerialKey

    • Email, FTP Upload or Burn to disk a Zip file on WinZip Job completion • Email Log files on WinZip Job completion Easy to Learn and Use • New! Content-sensitive Smart View logically displays the ...

    Exploring Expect.pdf

    - **Anonymous FTP**: A practical scenario demonstrating the use of Expect to perform anonymous FTP operations, highlighting the tool's versatility in automating file transfers. #### Advanced Topics ...

    2009 达内Unix学习笔记

    ftp工具 192.168.0.202 tools-toolss 老师测评网址 http://172.16.0.198:8080/poll/ 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和...

    win 3.11 for workgroup tcpip支持

    conditions is to put a #PRE against the name in the LMHOSTS file. This causes the name to be stored in the name cache when the machine is first initialized, so the name gets resolved without the ...

    Visual C++ 编程资源大全(英文源码 DLL)

    ftptransferdlg.zip CFTPTransferDlg provides an MFC dialog which performs FTP uploads and downloads similar to the Internet Explorer(43KB)&lt;END&gt;&lt;br&gt;29,memmap.zip A freeware MFC class to ...

    BSD HACKS -- 100个业界最尖端的技巧和工具

    How to Use this Book How This Book Is Organized Conventions Used in This Book Using Code Examples We'd Like to Hear from You Chapter 1. Customizing the User Environment ...

    php.ini-development

    Using this ini directive may cause problems unless you know what script ; is doing. ; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler" ; and you cannot use both "ob_gzhandler" ...

    EurekaLog_7.5.0.0_Enterprise

    18)..Fixed: Possible "Unit XYZ was compiled with a different version of ABC" when using packages 19)..Fixed: FastMM shared MM compatibility 20)..Fixed: Minor bugs in stack tracing (which usually ...

    python3.6.5参考手册 chm

    PEP 519: Adding a file system path protocol PEP 495: Local Time Disambiguation PEP 529: Change Windows filesystem encoding to UTF-8 PEP 528: Change Windows console encoding to UTF-8 PEP 520: ...

    sharpSSH c#实现SFTP的东东

    与FTP(File Transfer Protocol)相比,SFTP更安全,因为它在整个传输过程中都使用加密技术,防止了中间人攻击和数据泄露。 C#是微软开发的一种面向对象的编程语言,广泛应用于Windows平台的软件开发。在C#中实现...

    softap_ap6212a0_tinav2.1_验证通过_旧版本的系统_20170915_1223没有外层目录.7z

    &lt; &gt; FTP protocol support &lt; &gt; H.323 protocol support &lt; &gt; IRC protocol support &lt; &gt; NetBIOS name service protocol support &lt; &gt; SNMP service protocol support &lt; &gt; PPtP protocol support &lt; &gt; SANE ...

    C#浏览器编程,学习使用

    6) 许多浏览器还包含 FTP 客户,用来获取文件传送服务。 7) 一些浏览器也包含电子邮件客户,使浏览器能够发送和接收电子邮件 8) 浏览器将它取回的每一个页面副本都放入本地磁盘的缓存中。 9) 当用户用鼠标点击某个...

Global site tag (gtag.js) - Google Analytics