介绍:
download-cli是一个download模块的命令行版本。
安装:
$sudo npm install -g download-cli
用法:
$ download --help
输出:
charies:two xxxxxx$ download --help
Download and extract files
Usage
$ download <url>
$ download <url> > <file>
$ download --out <directory> <url>
$ cat <file> | download --out <directory>
Example
$ download http://foo.com/file.zip
$ download http://foo.com/cat.png > dog.png
$ download --extract --strip 1 --out dest http://foo.com/file.zip
$ cat urls.txt | download --out dest
Options
-e, --extract Try decompressing the file
-o, --out Where to place the downloaded files
-s, --strip <number> Strip leading paths from file names on extraction