/ tmp /cron_test/にファイルをダウンロードする必要があります。私のwgetコードは
wget --random-wait -r -p -nd -e robots=off -A".pdf" -U mozilla http://math.stanford.edu/undergrad/
では、ディレクトリを指定するためのパラメータはありますか?
/ tmp /cron_test/にファイルをダウンロードする必要があります。私のwgetコードは
wget --random-wait -r -p -nd -e robots=off -A".pdf" -U mozilla http://math.stanford.edu/undergrad/
では、ディレクトリを指定するためのパラメータはありますか?
マニュアルページから:
-P prefix
--directory-prefix=prefix
Set directory prefix to prefix. The directory prefix is the
directory where all other files and sub-directories will be
saved to, i.e. the top of the retrieval tree. The default
is . (the current directory).
-P /tmp/cron_test/
したがって、コマンドに(短い形式)または--directory-prefix=/tmp/cron_test/
(長い形式)を追加する必要があります。また、ディレクトリが存在しない場合は作成されることに注意してください。
-O
ダウンロードするファイルのパスを指定するオプションです。
wget <uri> -O /path/to/file.ext
-P
ディレクトリ内のファイルをダウンロードする場所のプレフィックスです。
wget <uri> -P /path/to/folder
man wget: -O file --output-document=file
wget "url" -O /tmp/cron_test/<file>