zoukankan      html  css  js  c++  java
  • aria2c 下载示例

    • 下载普通文件
    $aria2c "http://host/file.zip"
    
      NOTE: To  stop  a  download,  press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URIs as long as they are pointing to the same file.
    
    • 下载文件列表
    $ aria2c -ifiles.txt -j2
    NOTE: -j option specifies the number of parallel downloads.
    
    • 使用代理

      • For HTTP:
      $ aria2c --http-proxy="http://proxy:8080" "http://host/file"
      $ aria2c --http-proxy="http://proxy:8080" --no-proxy="localhost,127.0.0.1,192.168.0.0/16" "http://host/file"
      
    • FTP 下载:

    $ aria2c --ftp-proxy="http://proxy:8080" "ftp://host/file"
    NOTE: See --http-proxy, --https-proxy, --ftp-proxy, --all-proxy and --no-proxy for details.  You can specify proxy in the environment variables. See ENVIRONMENT section.
    
    • 使用带身份认证的http代理
    $ aria2c --http-proxy="http://username:password@proxy:8080" "http://host/file"
    $ aria2c --http-proxy="http://proxy:8080" --http-proxy-user="username" --http-proxy-passwd="password" "http://host/file"
    

    磁力链接下载

    • Download files with remote Metalink

      $ aria2c --follow-metalink=mem "http://host/file.metalink"
      
    • Download using a local metalink file

      $ aria2c -p --lowest-speed-limit=4000 file.metalink
      NOTE: To stop a download, press Ctrl-C.  You can resume the transfer by running aria2c with the same argument in the same directory.
      
    • Download several local metalink files

      $ aria2c -j2 file1.metalink file2.metalink
      
    • Download only selected files

      $ aria2c --select-file=1-4,8 file.metalink
       NOTE: The index is printed to the console using -S option.
      
    • Download a file using a local metalink file with user preference

      $ aria2c --metalink-location=jp,us --metalink-version=1.1 --metalink-language=en-US file.metalink
      

    BitTorrent 下载

    • Download files using a remote BitTorrent file
     $ aria2c --follow-torrent=mem "http://host/file.torrent"
    
    • Download using a local torrent file
    $ aria2c --max-upload-limit=40K file.torrent
    NOTE: –max-upload-limit specifies the max of upload rate
    
     NOTE: To stop a download, press Ctrl-C. You can resume the transfer later by running aria2c with the same argument in the same directory.
    
    • Download using BitTorrent Magnet URI
    $ aria2c "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C&dn=aria2"
    NOTE: Don’t forget to quote BitTorrent Magnet URIs which include & characters with single(') or double(") quotes when specifying URIs on the command-line.
    
    
    • Download 2 torrents
    $ aria2c -j2 file1.torrent file2.torrent
    

    Only download specific files (usually called “selected download”)

    $ aria2c --select-file=1-4,8 file.torrent
    NOTE: The index is printed to the console using -S option.
    
    • Load cookies
    $ aria2c --load-cookies=cookies.txt "http://host/file.zip"
    NOTE: You can use Firefox/Mozilla/Chromium’s cookie files without modification.
    
    
  • 相关阅读:
    【英语】Bingo口语笔记(40)
    【英语】Bingo口语笔记(38)
    【Python系统学习】基础篇
    【英语】Bingo口语笔记(37)
    [转]linux下ulimit命令详解
    【转】linux read 用法
    【转】Linux下使用locale命令设置语言环境
    【转】基于linux下的变量声明declare的用法
    [转]Linux中set,env和export这三个命令的区别
    linux下echo命令详解(转)
  • 原文地址:https://www.cnblogs.com/super-lulu/p/11739092.html
Copyright © 2011-2022 走看看