/tmp/cron_test/にファイルをダウンロードする必要があります。私のwgetコードは
wget --random-wait -r -p -nd -e robots=off -A".pdf" -U mozilla http://math.stanford.edu/undergrad/
ディレクトリを指定するためのパラメータはあるのでしょうか?
ベストアンサー1
マニュアルページより:
-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/
。また、ディレクトリが存在しない場合は作成されることに注意してください。